* feat: remove tinymce & replace org sidebar * chore: PR Fixes * chore: move ui font into src dir * remove files in vite config * use google font import for loading font * remove custom font * more fonts update * remove font bold * more removals of font bold * fix import * checkpoint * chore: checkpoint (add course & lms shadcn sidebar) * minor css improvements and try out font sans * chore: replace carbon components with shadcn's * chore: replace carbon components with shadcn _ v3 * chore: ui fixes & storybook update * feat: UI cleanup * fix: quick ui fixes * chore: update pnpm-lock.yaml with new dependencies and versions; fix output.css formatting * chore: add isloading to button * feat: add loading state to button stories * chore: feedback fixes * fix: feedback fixes * chore: remove console * fix: PR comments * fix: PR comments --------- Co-authored-by: Rotimi Best <best@classroomio.com>
46 lines
1.0 KiB
Svelte
46 lines
1.0 KiB
Svelte
<script module>
|
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
import { Label } from '@cio/ui/base/label';
|
|
import { Input } from '@cio/ui/base/input';
|
|
import { FIELDS } from './fields';
|
|
|
|
const { Story } = defineMeta({
|
|
title: 'Atom/Label',
|
|
component: Label,
|
|
parameters: {
|
|
layout: 'centered',
|
|
controls: {
|
|
include: FIELDS
|
|
}
|
|
},
|
|
tags: ['autodocs']
|
|
});
|
|
</script>
|
|
|
|
<Story name="Default">
|
|
{#snippet template()}
|
|
<Label>Email</Label>
|
|
{/snippet}
|
|
</Story>
|
|
|
|
<Story name="With Input">
|
|
{#snippet template()}
|
|
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
<Label for="email">Email</Label>
|
|
<Input type="email" id="email" placeholder="Email" />
|
|
</div>
|
|
{/snippet}
|
|
</Story>
|
|
|
|
<Story name="Required">
|
|
{#snippet template()}
|
|
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
<Label for="username">
|
|
Username
|
|
<span class="text-red-500">*</span>
|
|
</Label>
|
|
<Input id="username" placeholder="Username" required />
|
|
</div>
|
|
{/snippet}
|
|
</Story>
|