Skip to content

Commit

Permalink
add extra style sx properly
Browse files Browse the repository at this point in the history
  • Loading branch information
m4manjesh committed Feb 20, 2024
1 parent 1de37d2 commit 6e46ba1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/NoWrapTypography/NoWrapTypography.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ const Template: StoryFn<NoWrapTypographyProps> = props => {
);
};

export const Default = {
export const Default: {
args: NoWrapTypographyProps;
render: StoryFn<NoWrapTypographyProps>;
} = {
args: {
children: "text that is too long to fit in the box",
sx: { fontSize: "18px", maxWidth: "250px" }
sx: { fontSize: "16px", maxWidth: "250px" }
},

render: Template
Expand Down
2 changes: 1 addition & 1 deletion src/NoWrapTypography/NoWrapTypography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function NoWrapTypography({
textOverflow: "ellipsis",
whiteSpace: "nowrap",
wordBreak: "break-all",
...(Array.isArray(sx) ? sx : [sx])
...sx
}}
variant={variant}
>
Expand Down

0 comments on commit 6e46ba1

Please sign in to comment.