-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: cover wrapping siblings individually in inverted codemod
- Loading branch information
Martí Malek
committed
Oct 31, 2023
1 parent
a6f440b
commit 755d9da
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
src/codemods/__testfixtures__/inverted-to-wrapper/individual-wrap-siblings.input.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Button, Box } from '@freenow/wave'; | ||
|
||
interface Props { | ||
label: string; | ||
disabled?: boolean; | ||
onClick: () => void; | ||
} | ||
|
||
export const ActionItem = ({ label, onClick }: Props): JSX.Element => ( | ||
<Box> | ||
<Button inverted size="small" onClick={onClick}> | ||
{label} | ||
</Button> | ||
<Button inverted size="small" onClick={onClick}> | ||
{label} | ||
</Button> | ||
</Box> | ||
); |
22 changes: 22 additions & 0 deletions
22
src/codemods/__testfixtures__/inverted-to-wrapper/individual-wrap-siblings.output.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Button, Box, InvertedColorScheme } from '@freenow/wave'; | ||
|
||
interface Props { | ||
label: string; | ||
disabled?: boolean; | ||
onClick: () => void; | ||
} | ||
|
||
export const ActionItem = ({ label, onClick }: Props): JSX.Element => ( | ||
<Box> | ||
<InvertedColorScheme> | ||
<Button size="small" onClick={onClick}> | ||
{label} | ||
</Button> | ||
</InvertedColorScheme> | ||
<InvertedColorScheme> | ||
<Button size="small" onClick={onClick}> | ||
{label} | ||
</Button> | ||
</InvertedColorScheme> | ||
</Box> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters