Skip to content

Text/Paragraph component #698

Nov 18, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

For reference, this is its blade code so you can see the size options and the default styling:

@props([
    'size' => null,
])

@php
$classes = Flux::classes()
    ->add(match ($size) {
        'xl' => 'text-lg',
        'lg' => 'text-base',
        default => 'text-sm',
        'sm' => 'text-xs',
    })
    ->add('text-zinc-500 dark:text-white/70')
    ;
@endphp

<div {{ $attributes->class($classes) }} data-flux-text>
    {{ $slot }}
</div>

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jeffchown
Comment options

Answer selected by LasseRafn
@LasseRafn
Comment options

@jeffchown
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants