mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(components): add Form, FormGroup, FormItem, FormLabel
Supports #17 Fixes broken storybook. TODO: Define stories using other components (e.g. NumberInput, Select...)
This commit is contained in:
parent
3345b71a8c
commit
3be285e112
18 changed files with 248 additions and 1 deletions
14
src/components/FormLabel/FormLabel.svelte
Normal file
14
src/components/FormLabel/FormLabel.svelte
Normal file
|
@ -0,0 +1,14 @@
|
|||
<script>
|
||||
let className = undefined;
|
||||
export { className as class };
|
||||
export let id = Math.random();
|
||||
export let style = undefined;
|
||||
|
||||
import { cx } from '../../lib';
|
||||
|
||||
const _class = cx('--form-item', className);
|
||||
</script>
|
||||
|
||||
<label for={id} class={_class} {style}>
|
||||
<slot />
|
||||
</label>
|
Loading…
Add table
Add a link
Reference in a new issue