-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove borderRadius.none and use 1px in codemod
- Loading branch information
Robin Métral
committed
Jun 16, 2021
1 parent
7616ecf
commit 494c4fa
Showing
7 changed files
with
8 additions
and
20 deletions.
There are no files selected for viewing
9 changes: 2 additions & 7 deletions
9
packages/circuit-ui/cli/migrate/__testfixtures__/theme-border-radius.input.js
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 |
---|---|---|
@@ -1,17 +1,12 @@ | ||
import styled from '@emotion/styled'; | ||
import { css } from '@emotion/core'; | ||
|
||
const borderRadiusStyles = ({ theme }) => css` | ||
const elementStyles = ({ theme }) => css` | ||
border-top-left-radius: ${theme.borderRadius.mega}; | ||
border-top-right-radius: ${theme.borderRadius.giga}; | ||
border-bottom-left-radius: ${theme.borderRadius.tera}; | ||
border-bottom-right-radius: ${theme.borderRadius.peta}; | ||
`; | ||
|
||
const removedRadiusStyles = ({ theme }) => css` | ||
border-radius: ${theme.borderRadius.kilo}; | ||
`; | ||
|
||
const BorderRadius = styled.div(borderRadiusStyles); | ||
|
||
const RemovedRadius = styled.div(removedRadiusStyles); | ||
const Element = styled.div(elementStyles); |
11 changes: 3 additions & 8 deletions
11
packages/circuit-ui/cli/migrate/__testfixtures__/theme-border-radius.output.js
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 |
---|---|---|
@@ -1,17 +1,12 @@ | ||
import styled from '@emotion/styled'; | ||
import { css } from '@emotion/core'; | ||
|
||
const borderRadiusStyles = ({ theme }) => css` | ||
const elementStyles = ({ theme }) => css` | ||
border-top-left-radius: ${theme.borderRadius.bit}; | ||
border-top-right-radius: ${theme.borderRadius.byte}; | ||
border-bottom-left-radius: ${theme.borderRadius.byte}; | ||
border-bottom-right-radius: ${theme.borderRadius.kilo}; | ||
border-radius: ${'1px'}; | ||
`; | ||
|
||
const removedRadiusStyles = ({ theme }) => css` | ||
border-radius: ${theme.borderRadius.none}; | ||
`; | ||
|
||
const BorderRadius = styled.div(borderRadiusStyles); | ||
|
||
const RemovedRadius = styled.div(removedRadiusStyles); | ||
const Element = styled.div(elementStyles); |
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
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
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
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
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