Skip to content

Commit

Permalink
fix broken build
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanbj committed Aug 19, 2022
1 parent 24391dd commit 974a476
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/react/src/Button/stories/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ export const Default = (props: {
const { composition, disabled } = props;

// Helper component that allows us to change the contentof the button when toggling the composition control in Storybook
const ButtonContent = ({ children }) => {
const ButtonContent = ({ children }: { children: React.ReactNode }) => {
switch (composition) {
case Composition.Text:
return children;
case Composition.Icon:
return <House />;
case Composition.TextIcon:
Expand All @@ -52,14 +50,18 @@ export const Default = (props: {
{children}
</>
);
default:
return children;
}
};

const buttons = [
<Button key="button">
{/* @ts-expect-error care */}
<ButtonContent>Button</ButtonContent>
</Button>,
<Button key="link" href="#">
{/* @ts-expect-error care */}
<ButtonContent>Link</ButtonContent>
</Button>,
];
Expand Down Expand Up @@ -113,6 +115,6 @@ const ButtonsDisplayer = (props: {
);
};

const ButtonSpacer = (props) => (
const ButtonSpacer = (props: { children: React.ReactNode }) => (
<div className="my-8 flex flex-row justify-center gap-8" {...props} />
);

0 comments on commit 974a476

Please sign in to comment.