diff --git a/packages/@react-spectrum/s2/chromatic/ActionButton.stories.tsx b/packages/@react-spectrum/s2/chromatic/ActionButton.stories.tsx index 8fbc6f25644..9aa0e2149eb 100644 --- a/packages/@react-spectrum/s2/chromatic/ActionButton.stories.tsx +++ b/packages/@react-spectrum/s2/chromatic/ActionButton.stories.tsx @@ -10,11 +10,12 @@ * governing permissions and limitations under the License. */ -import {ActionButton, Avatar, Text} from '../src'; +import {ActionButton, ActionButtonProps, Avatar, Text} from '../src'; import {Fonts, NotificationBadges, UnsafeClassName} from '../stories/ActionButton.stories'; import {generatePowerset} from '@react-spectrum/story-utils'; -import type {Meta} from '@storybook/react'; +import type {Meta, StoryObj} from '@storybook/react'; import NewIcon from '../s2wf-icons/S2_Icon_New_20_N.svg'; +import {ReactElement} from 'react'; import {shortName} from './utils'; import {StaticColorProvider} from '../stories/utils'; import {style} from '../style' with { type: 'macro' }; @@ -29,6 +30,8 @@ const meta: Meta = { export default meta; +type ActionButtonStory = StoryObj; + let states = [ {isQuiet: true}, {isDisabled: true}, @@ -38,7 +41,7 @@ let states = [ let combinations = generatePowerset(states); -const Template = (args) => { +const Template = (args: ActionButtonProps): ReactElement => { let {children, ...otherArgs} = args; return (
@@ -64,33 +67,33 @@ const Template = (args) => { ); }; -export const Default = { - render: Template +export const Default: ActionButtonStory = { + render: (args) =>