Skip to content

Commit

Permalink
add custom props to story
Browse files Browse the repository at this point in the history
  • Loading branch information
heyjul3s committed Jan 2, 2021
1 parent e813055 commit 74019c7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/text-input/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,25 @@ const inputs = {
}
};

type BasicUsageProps = {
disabled?: boolean;
placeholder?: string;
onBlur?: () => void;
};

const { Base: InputText, InputSearch, InputUrl } = createTextInputs<
typeof inputs.components
typeof inputs.components,
BasicUsageProps
>(inputs.base, inputs.components);

export function BasicUsage() {
const onBlur = (text: string) => () => {
console.log('Blur', text);
};

return (
<>
<InputText />
<InputText onBlur={onBlur('Hello')} />
<InputSearch />
<InputUrl />
</>
Expand Down

0 comments on commit 74019c7

Please sign in to comment.