diff --git a/src/select/stories/Select.stories.tsx b/src/select/stories/Select.stories.tsx index 125301d1b..b67091f32 100644 --- a/src/select/stories/Select.stories.tsx +++ b/src/select/stories/Select.stories.tsx @@ -15,36 +15,49 @@ export default { } as Meta; const countries = [ - { name: "australia" }, - { name: "russia" }, - { name: "new zealand" }, - { name: "india" }, - { name: "california" }, - { name: "ireland" }, - { name: "indonesia" }, - { name: "chennai" }, - { name: "mexico" }, - { name: "sydney" }, - { name: "africa" }, - { name: "las vagas" }, - { name: "vietnam" }, - { name: "zimbabwe" }, + { name: "australia", emoji: "🇦🇺" }, + { name: "russia", emoji: "🇷🇺" }, + { name: "new zealand", emoji: "🇳🇿" }, + { name: "india", emoji: "🇮🇳" }, + { name: "niger", emoji: "🇳🇪" }, + { name: "canada", emoji: "🇨🇦" }, + { name: "indonesia", emoji: "🇮🇩" }, + { name: "portugal", emoji: "🇵🇹" }, + { name: "norway", emoji: "🇳🇴" }, + { name: "switzerland", emoji: "🇨🇭" }, + { name: "africa", emoji: "🇨🇫" }, + { name: "colombia", emoji: "🇨🇴" }, + { name: "costa rica", emoji: "🇨🇷" }, + { name: "zimbabwe", emoji: "🇿🇼" }, ]; const SelectPicker: React.FC<{ state: any }> = ({ state }) => { return ( - console.log(value)} + > + + {state.isPlaceholder ? "Select one.." : state.selected.join(",")} - + {countries.map(item => { return ( - - {item.name} + + {item.emoji} - {item.name} ); })} @@ -62,15 +75,50 @@ export const Default: React.FC = () => { export const MultiSelect: React.FC = () => { const state = useSelectState({ allowMultiselect: true }); - return ; + return ( + + ); }; export const MultiSelectCheckboxes: React.FC = () => { const state = useSelectState({ allowMultiselect: true }); return ( - console.log(value)} + > + {state.isPlaceholder ? "Select one.." @@ -78,10 +126,19 @@ export const MultiSelectCheckboxes: React.FC = () => { - + {countries.map(item => { return ( - +