File tree Expand file tree Collapse file tree
platforms/metagram/src/lib/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <script context =" module" >
2+ export { LabelText };
3+ </script >
4+
5+ {#snippet LabelText ()}
6+ this is label
7+ {/ snippet }
Original file line number Diff line number Diff line change 1+ import type { ComponentProps } from 'svelte' ;
2+ import { Label } from '..' ;
3+ import { LabelText } from './Label.stories.snippet.svelte' ;
4+
5+ export default {
6+ title : 'UI/Label' ,
7+ component : Label ,
8+ tags : [ 'autodocs' ] ,
9+ render : ( args : { Component : Label ; props : ComponentProps < typeof Label > } ) => ( {
10+ Component : Label ,
11+ props : args
12+ } )
13+ } ;
14+
15+ export const Primary = {
16+ args : { children : LabelText }
17+ } ;
Original file line number Diff line number Diff line change 1+ <script lang =" ts" >
2+ import { cn } from ' $lib/utils' ;
3+ import type { Snippet } from ' svelte' ;
4+ import type { HTMLLabelAttributes } from ' svelte/elements' ;
5+
6+ interface ILabelProps extends HTMLLabelAttributes {
7+ children: Snippet ;
8+ }
9+
10+ let { children, ... restProps }: ILabelProps = $props ();
11+
12+ const cBase = ' inline-block text-lg font-geist font-medium text-black-800' ;
13+ </script >
14+
15+ <label {...restProps } class ={cn ([cBase , restProps .class ].join (' ' ))}>
16+ {@render children ?.()}
17+ </label >
Original file line number Diff line number Diff line change 11export { default as Button } from './Button/Button.svelte' ;
22export { default as Avatar } from './Avatar/Avatar.svelte' ;
33export { default as Input } from './Input/Input.svelte' ;
4+ export { default as Label } from './Label/Label.svelte' ;
45export { default as Toggle } from './Toggle/Toggle.svelte' ;
You can’t perform that action at this time.
0 commit comments