File tree Expand file tree Collapse file tree 4 files changed +42
-0
lines changed
platforms/metagram/src/lib/ui Expand file tree Collapse file tree 4 files changed +42
-0
lines changed 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 1
1
export { default as Button } from './Button/Button.svelte' ;
2
2
export { default as Avatar } from './Avatar/Avatar.svelte' ;
3
3
export { default as Input } from './Input/Input.svelte' ;
4
+ export { default as Label } from './Label/Label.svelte' ;
4
5
export { default as Toggle } from './Toggle/Toggle.svelte' ;
You can’t perform that action at this time.
0 commit comments