An open source design system that's fully customizable and agent ready
TypeScript
test(Tokenizer): the end-lane contract's overflow-mode URL arg reaches the story (#8829)
Cindy Zhangd68ee0c33fc1
diff --git a/apps/storybook/stories/Tokenizer.stories.tsx b/apps/storybook/stories/Tokenizer.stories.tsxindex d85226ab45..5a303c4430 100644--- a/apps/storybook/stories/Tokenizer.stories.tsx+++ b/apps/storybook/stories/Tokenizer.stories.tsx@@ -3,6 +3,7 @@import {useState} from 'react';import type {Meta, StoryObj} from '@storybook/react';import {Tokenizer} from '@astryxdesign/core/Tokenizer';+import type {TokenizerOverflowBehavior} from '@astryxdesign/core/Tokenizer';import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';import {Button} from '@astryxdesign/core/Button';import {Token} from '@astryxdesign/core/Token';@@ -47,6 +48,12 @@ const slowUserSource: SearchSource = {new Promise(resolve => setTimeout(() => resolve(users.slice(0, 5)), 1200)),};+const overflowBehaviors: TokenizerOverflowBehavior[] = [+ 'none',+ 'unfocusedInline',+ 'unfocusedLayer',+];+const meta: Meta<typeof Tokenizer> = {title: 'Core/Tokenizer',component: Tokenizer,@@ -69,6 +76,14 @@ const meta: Meta<typeof Tokenizer> = {options: ['sm', 'md', 'lg'],description: 'Input size',},+ tokenOverflowBehavior: {+ control: 'radio',+ options: overflowBehaviors,+ // Docgen cannot read Tokenizer's prop types through its overloaded+ // signature, and Storybook drops a URL arg whose argType names no type.+ // The browser end-lane contract sets this one from the URL.+ type: {name: 'enum', value: overflowBehaviors},+ },},decorators: [// A 400px column where there is room that shrinks with the viewport, so