diff options
Diffstat (limited to 'apps/website/src/components/base/Paragraph.astro')
-rw-r--r-- | apps/website/src/components/base/Paragraph.astro | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/apps/website/src/components/base/Paragraph.astro b/apps/website/src/components/base/Paragraph.astro index 08fbbdd..832b296 100644 --- a/apps/website/src/components/base/Paragraph.astro +++ b/apps/website/src/components/base/Paragraph.astro @@ -1,31 +1,31 @@ --- -import type { HTMLAttributes } from "astro/types"; +import type { HTMLAttributes } from 'astro/types'; const sizes = { - xs: "text-xs", - sm: "text-sm", - md: "text-md", - lg: "text-lg", - xl: "text-xl" -} + xs: 'text-xs', + sm: 'text-sm', + md: 'text-md', + lg: 'text-lg', + xl: 'text-xl', +}; -interface Props extends HTMLAttributes<"p"> { - text?: string, +interface Props extends HTMLAttributes<'p'> { + text?: string size?: keyof typeof sizes } const { - text = "", - size = "md", + text = '', + size = 'md', ...props } = Astro.props; const className = [ sizes[size], - props.class -].join(" "); + props.class, +].join(' '); --- -<p class={className} {...props}> - {text ? text : <slot />} -</p> + <p class={className} {...props}> + {text || <slot />} + </p> |