Improvements to shared library components

This commit is contained in:
Josh Perez 2021-07-21 16:45:41 -04:00 committed by GitHub
parent 2c59c71872
commit d9e90e9ea8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 485 additions and 348 deletions

View file

@ -21,7 +21,7 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
hasClearButton: Boolean(overrideProps.hasClearButton),
i18n,
icon: overrideProps.icon,
maxGraphemeCount: overrideProps.maxGraphemeCount,
maxLengthCount: overrideProps.maxLengthCount,
onChange: action('onChange'),
placeholder: text(
'placeholder',
@ -51,7 +51,7 @@ stories.add('hasClearButton', () => (
stories.add('character count', () => (
<Controller
{...createProps({
maxGraphemeCount: 10,
maxLengthCount: 10,
})}
/>
));
@ -59,7 +59,7 @@ stories.add('character count', () => (
stories.add('character count (customizable show)', () => (
<Controller
{...createProps({
maxGraphemeCount: 64,
maxLengthCount: 64,
whenToShowRemainingCount: 32,
})}
/>
@ -78,7 +78,7 @@ stories.add('expandable w/count', () => (
{...createProps({
expandable: true,
hasClearButton: true,
maxGraphemeCount: 140,
maxLengthCount: 140,
whenToShowRemainingCount: 0,
})}
/>