diff --git a/packages/react/src/components/Button/__snapshots__/index.story.storyshot b/packages/react/src/components/Button/__snapshots__/index.story.storyshot index 32a5b2047..b44d96a5c 100644 --- a/packages/react/src/components/Button/__snapshots__/index.story.storyshot +++ b/packages/react/src/components/Button/__snapshots__/index.story.storyshot @@ -1344,7 +1344,6 @@ exports[`Storyshots Button Nihongo 1`] = ` diff --git a/packages/react/src/components/Button/index.story.tsx b/packages/react/src/components/Button/index.story.tsx index b3b8983ec..b438eb7ef 100644 --- a/packages/react/src/components/Button/index.story.tsx +++ b/packages/react/src/components/Button/index.story.tsx @@ -1,4 +1,3 @@ -import { action } from '@storybook/addon-actions' import { useRef } from 'react' import { ClickableElement } from '../Clickable' import Button, { ButtonProps } from '.' @@ -75,24 +74,21 @@ export const Link: StoryObj = { } export const Nihongo: StoryObj = { - render: (args) => ( - , +} + +const FocusRender = (args: ButtonProps) => { + const ref = useRef(null) + const focus = () => ref.current?.focus() + return ( + - ), + ) } export const Focus: StoryObj = { - render: (args: ButtonProps) => { - // eslint-disable-next-line react-hooks/rules-of-hooks - const ref = useRef(null) - const focus = () => ref.current?.focus() - return ( - - ) - }, + render: FocusRender, } export const LayoutExample: StoryObj = {