mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
add name to form components
This commit is contained in:
parent
64e914ff8c
commit
6fdb8d10ed
32 changed files with 82 additions and 26 deletions
|
@ -14,7 +14,8 @@
|
|||
{:else}
|
||||
<NumberInput
|
||||
{...$$props}
|
||||
id="slider"
|
||||
id="number-input-id"
|
||||
name="number-input-id"
|
||||
bind:value
|
||||
on:change={({ detail }) => {
|
||||
console.log('on:change', detail);
|
||||
|
|
|
@ -6,7 +6,8 @@ export default { title: 'NumberInput', decorators: [withKnobs] };
|
|||
export const Default = () => ({
|
||||
Component,
|
||||
props: {
|
||||
id: 'number-input',
|
||||
id: text('NumberInput id', 'number-input-id'),
|
||||
name: text('NumberInput name', 'number-input-name'),
|
||||
label: text('Label (label)', 'Number Input label'),
|
||||
hideLabel: boolean('Hide label (hideLabel)', false),
|
||||
min: number('Minimum value (min)', 0),
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
export let hideLabel = false;
|
||||
export let iconDescription = '';
|
||||
export let id = Math.random();
|
||||
export let name = Math.random();
|
||||
export let invalid = false;
|
||||
export let invalidText = 'Provide invalidText';
|
||||
export let mobile = false;
|
||||
|
@ -96,6 +97,7 @@
|
|||
}}
|
||||
{disabled}
|
||||
{id}
|
||||
{name}
|
||||
{max}
|
||||
{min}
|
||||
{step}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue