File tree 5 files changed +55
-1
lines changed
5 files changed +55
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ An elemental component for the `i` tag.
113
113
114
114
An elemental component for the ` img ` tag.
115
115
116
+ ## Label
117
+
118
+ An elemental component for the ` label ` tag.
119
+
116
120
## Li
117
121
118
122
An elemental component for the ` li ` tag.
Original file line number Diff line number Diff line change 15
15
16
16
// Remember to update types file if you add/remove/rename props.
17
17
export let use: ActionArray = [];
18
- export let alt = ' ' ;
18
+ export let alt: string | undefined = undefined ;
19
19
20
20
const forwardEvents = forwardEventsBuilder (get_current_component ());
21
21
Original file line number Diff line number Diff line change
1
+ <label
2
+ bind:this ={element }
3
+ use:useActions ={use }
4
+ use:forwardEvents
5
+ for ={forId }
6
+ {...$$restProps }
7
+ >
8
+ <slot />
9
+ </label >
10
+
11
+ <script lang =" ts" >
12
+ import { get_current_component } from ' svelte/internal' ;
13
+
14
+ import type { ActionArray } from ' ../internal/useActions.js' ;
15
+ import { forwardEventsBuilder , useActions } from ' ../internal/index.js' ;
16
+
17
+ // Remember to update types file if you add/remove/rename props.
18
+ export let use: ActionArray = [];
19
+ let forId: string | undefined = undefined ;
20
+ export { forId as for };
21
+
22
+ const forwardEvents = forwardEventsBuilder (get_current_component ());
23
+
24
+ let element: HTMLLabelElement ;
25
+
26
+ export function getElement() {
27
+ return element ;
28
+ }
29
+ </script >
Original file line number Diff line number Diff line change
1
+ import type Component from './Label.svelte' ;
2
+
3
+ export declare class LabelComponentDev extends Component {
4
+ /**
5
+ * @private
6
+ * For type checking capabilities only.
7
+ * Does not exist at runtime.
8
+ * ### DO NOT USE!
9
+ */
10
+ $$prop_def : Omit <
11
+ Partial < svelte . JSX . HTMLAttributes < HTMLLabelElement > > ,
12
+ 'use' | 'for'
13
+ > &
14
+ Component [ '$$prop_def' ] ;
15
+ }
Original file line number Diff line number Diff line change @@ -94,6 +94,12 @@ export * from './Img.types.js';
94
94
const Img = ImgComponent as typeof ImgComponentDev ;
95
95
export { Img } ;
96
96
97
+ import LabelComponent from './Label.svelte' ;
98
+ import type { LabelComponentDev } from './Label.types.js' ;
99
+ export * from './Label.types.js' ;
100
+ const Label = LabelComponent as typeof LabelComponentDev ;
101
+ export { Label } ;
102
+
97
103
import LiComponent from './Li.svelte' ;
98
104
import type { LiComponentDev } from './Li.types.js' ;
99
105
export * from './Li.types.js' ;
You can’t perform that action at this time.
0 commit comments