Skip to content

Commit fb21195

Browse files
committed
docs: show step usage with number textfield
1 parent f9523fa commit fb21195

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

packages/textfield/Textfield.svelte

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@
3535
<Input
3636
{type}
3737
{disabled}
38-
{step}
39-
{min}
40-
{max}
4138
bind:value
4239
bind:files
4340
bind:dirty
@@ -127,11 +124,8 @@
127124
export let invalid = uninitializedValue;
128125
export let updateInvalid = invalid === uninitializedValue;
129126
export let useNativeValidation = updateInvalid;
130-
export let step = null;
131-
export let min = null;
132-
export let max = null;
133127
134-
$: props = exclude($$props, ['use', 'class', 'ripple', 'disabled', 'fullwidth', 'textarea', 'variant', 'dense', 'withLeadingIcon', 'withTrailingIcon', 'noLabel', 'label', 'type', 'value', 'dirty', 'invalid', 'updateInvalid', 'useNativeValidation', 'input$', 'label$', 'ripple$', 'outline$', 'step', 'min', 'max']);
128+
$: props = exclude($$props, ['use', 'class', 'ripple', 'disabled', 'fullwidth', 'textarea', 'variant', 'dense', 'withLeadingIcon', 'withTrailingIcon', 'noLabel', 'label', 'type', 'value', 'dirty', 'invalid', 'updateInvalid', 'useNativeValidation', 'input$', 'label$', 'ripple$', 'outline$']);
135129
136130
let element;
137131
let textField;

site/src/routes/demo/textfield.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,10 @@
431431
<Textfield bind:value={valueTypeNumber} label="Number" type="number" />
432432
</div>
433433

434+
<div>
435+
<Textfield bind:value={valueTypeNumberStep} label="Number with Step" type="number" input$step="2" />
436+
</div>
437+
434438
<div>
435439
<Textfield bind:value={valueTypeDate} label="DateTime-Local" type="datetime-local" />
436440
</div>
@@ -549,6 +553,7 @@
549553
let valueFullwidthTextarea = '';
550554
let valueElementsLabel = '';
551555
let valueTypeNumber = 0;
556+
let valueTypeNumberStep = 0;
552557
let valueTypeDate = '';
553558
let valueTypeFiles = [];
554559
let valueManualA = '';

0 commit comments

Comments
 (0)