[ui] add textSize prop to typeahead

This commit is contained in:
Yangshun Tay
2022-10-28 08:07:31 +08:00
parent a1fc43242e
commit 9df6b52392
2 changed files with 124 additions and 93 deletions

View File

@@ -1,8 +1,13 @@
import React, { useState } from 'react';
import type { ComponentMeta } from '@storybook/react';
import type { TypeaheadOption } from '@tih/ui';
import type { TypeaheadOption, TypeaheadTextSize } from '@tih/ui';
import { Typeahead } from '@tih/ui';
const typeaheadTextSizes: ReadonlyArray<TypeaheadTextSize> = [
'default',
'inherit',
];
export default {
argTypes: {
disabled: {
@@ -23,6 +28,10 @@ export default {
required: {
control: 'boolean',
},
textSize: {
control: { type: 'select' },
options: typeaheadTextSizes,
},
},
component: Typeahead,
parameters: {