mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
chore(FluidForm): temporary invalid props
This commit is contained in:
parent
4f7d4fa434
commit
7689c33a75
2 changed files with 11 additions and 2 deletions
|
@ -3,6 +3,9 @@
|
||||||
import FluidForm from "./FluidForm.svelte";
|
import FluidForm from "./FluidForm.svelte";
|
||||||
|
|
||||||
$: value = null;
|
$: value = null;
|
||||||
|
// remove props on publish
|
||||||
|
export let inputInvalid = false;
|
||||||
|
export let passwordInvalid = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<FluidForm
|
<FluidForm
|
||||||
|
@ -17,6 +20,7 @@
|
||||||
labelText="Text Input label"
|
labelText="Text Input label"
|
||||||
placeholder="Placeholder text"
|
placeholder="Placeholder text"
|
||||||
bind:value
|
bind:value
|
||||||
|
invalid="{inputInvalid}"
|
||||||
on:keydown="{(e) => {
|
on:keydown="{(e) => {
|
||||||
console.log('on:keydown', e);
|
console.log('on:keydown', e);
|
||||||
}}"
|
}}"
|
||||||
|
@ -29,7 +33,7 @@
|
||||||
type="password"
|
type="password"
|
||||||
id="test4"
|
id="test4"
|
||||||
labelText="Password"
|
labelText="Password"
|
||||||
invalid
|
invalid="{passwordInvalid}"
|
||||||
invalidText="Your password must be at least 6 characters as well as contain at least one uppercase, one lowercase, and one number."
|
invalidText="Your password must be at least 6 characters as well as contain at least one uppercase, one lowercase, and one number."
|
||||||
on:keydown="{(e) => {
|
on:keydown="{(e) => {
|
||||||
console.log('on:keydown', e);
|
console.log('on:keydown', e);
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
import { withKnobs } from "@storybook/addon-knobs";
|
import { withKnobs, boolean } from "@storybook/addon-knobs";
|
||||||
import Component from "./FluidForm.Story.svelte";
|
import Component from "./FluidForm.Story.svelte";
|
||||||
|
|
||||||
export default { title: "FluidForm", decorators: [withKnobs] };
|
export default { title: "FluidForm", decorators: [withKnobs] };
|
||||||
|
|
||||||
export const Default = () => ({
|
export const Default = () => ({
|
||||||
Component,
|
Component,
|
||||||
|
props: {
|
||||||
|
// remove props on publish
|
||||||
|
inputInvalid: boolean('input is invalid', false),
|
||||||
|
passwordInvalid: boolean('password is invalid', false)
|
||||||
|
}
|
||||||
});
|
});
|
Loading…
Add table
Add a link
Reference in a new issue