mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +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";
|
||||
|
||||
$: value = null;
|
||||
// remove props on publish
|
||||
export let inputInvalid = false;
|
||||
export let passwordInvalid = false;
|
||||
</script>
|
||||
|
||||
<FluidForm
|
||||
|
@ -17,6 +20,7 @@
|
|||
labelText="Text Input label"
|
||||
placeholder="Placeholder text"
|
||||
bind:value
|
||||
invalid="{inputInvalid}"
|
||||
on:keydown="{(e) => {
|
||||
console.log('on:keydown', e);
|
||||
}}"
|
||||
|
@ -29,7 +33,7 @@
|
|||
type="password"
|
||||
id="test4"
|
||||
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."
|
||||
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";
|
||||
|
||||
export default { title: "FluidForm", decorators: [withKnobs] };
|
||||
|
||||
export const Default = () => ({
|
||||
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