diff --git a/src/NoWrapTypography/NoWrapTypography.stories.tsx b/src/NoWrapTypography/NoWrapTypography.stories.tsx index ee6427fe..87e3b787 100644 --- a/src/NoWrapTypography/NoWrapTypography.stories.tsx +++ b/src/NoWrapTypography/NoWrapTypography.stories.tsx @@ -29,10 +29,13 @@ const Template: StoryFn = props => { ); }; -export const Default = { +export const Default: { + args: NoWrapTypographyProps; + render: StoryFn; +} = { args: { children: "text that is too long to fit in the box", - sx: { fontSize: "18px", maxWidth: "250px" } + sx: { fontSize: "16px", maxWidth: "250px" } }, render: Template diff --git a/src/NoWrapTypography/NoWrapTypography.tsx b/src/NoWrapTypography/NoWrapTypography.tsx index 98cd6dbd..a96aa930 100644 --- a/src/NoWrapTypography/NoWrapTypography.tsx +++ b/src/NoWrapTypography/NoWrapTypography.tsx @@ -39,7 +39,7 @@ export default function NoWrapTypography({ textOverflow: "ellipsis", whiteSpace: "nowrap", wordBreak: "break-all", - ...(Array.isArray(sx) ? sx : [sx]) + ...sx }} variant={variant} >