Skip to content

Commit 3301d69

Browse files
authored
Update no-deprecated-colors.md
1 parent 10fc6af commit 3301d69

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/rules/no-deprecated-colors.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ This rule disallows references to color variables that are deprecated in [Primer
1616
import {Box, themeGet} from '@primer/components'
1717
import styled from 'styled-components'
1818

19-
const Example() = () => <Box color="some.deprecated.color">Incorrect</Box>
19+
const SystemPropExample() = () => <Box color="some.deprecated.color">Incorrect</Box>
2020

21-
const StyledExample = styled.div`
21+
const SxPropExample() = () => <Box sx={{color: 'some.deprecated.color'}}>Incorrect</Box>
22+
23+
const ThemeGetExample = styled.div`
2224
color: ${themeGet('some.deprecated.color')};
2325
`
2426
```
@@ -30,9 +32,11 @@ const StyledExample = styled.div`
3032
import {Box, themeGet} from '@primer/components'
3133
import styled from 'styled-components'
3234

33-
const Example() = () => <Box color="some.color">Correct</Box>
35+
const SystemPropExample() = () => <Box color="some.color">Incorrect</Box>
36+
37+
const SxPropExample() = () => <Box sx={{color: 'some.color'}}>Incorrect</Box>
3438

35-
const StyledExample = styled.div`
39+
const ThemeGetExample = styled.div`
3640
color: ${themeGet('some.color')};
3741
`
3842
```

0 commit comments

Comments
 (0)