mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-07-17 12:01:51 +08:00
[ui] add textSize prop to typeahead
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user