fix: run system props codemod
Luke Karrys committed
Oct 14, 2023 at 19:38 UTC
bee61fffe08d8212eb7872b23a263609132aab24
10 files changed
+31
-14
theme/src/components/contributors.js
+1
-2
@@ -28,7 +28,7 @@ function Contributors({logins, latestCommit}) {
28
{logins.length} {pluralize('contributor', logins.length)}
29
</Text>
30
{logins.map(login => (
31
- <Link key={login} href={`https://github.com/${login}`} lineHeight="condensedUltra" mr={2}>
31
+ <Link key={login} href={`https://github.com/${login}`} sx={{lineHeight: 'condensedUltra', mr: 2}}>
32
{/* eslint-disable-next-line primer-react/a11y-tooltip-interactive-trigger */}
33
<Tooltip key={login} aria-label={login}>
34
<Avatar src={`https://github.com/${login}.png?size=40`} alt={login} />
@@ -36,7 +36,6 @@ function Contributors({logins, latestCommit}) {
36
</Link>
37
))}
38
</Flex>
39
-
39
{latestCommit ? (
40
<Text fontSize={1} color="gray.7" mt={1}>
41
Last edited by <Link href={`https://github.com/${latestCommit.login}`}>{latestCommit.login}</Link> on{' '}
theme/src/components/header.js
+8
-3
@@ -23,7 +23,12 @@ function Header({location, repositoryUrl}) {
23
const search = useSearch()
24
25
const logoStyle = {color: '#cb0000', marginRight: '16px'}
26
- const titleStyle = {color: '#dddddd', fontWeight: '600', display: 'flex', alignItems: 'center'}
26
+ const titleStyle = {
27
+ color: '#dddddd',
28
+ fontWeight: '600',
29
+ display: 'flex',
30
+ alignItems: 'center',
31
+ }
32
33
return (
34
<Box position="sticky" role="banner">
@@ -36,7 +41,7 @@ function Header({location, repositoryUrl}) {
41
bg="#333333"
42
>
43
<Flex alignItems="center">
39
- <Link as={GatsbyLink} to="/" style={titleStyle} mr={4}>
44
+ <Link as={GatsbyLink} to="/" style={titleStyle} sx={{mr: 4}}>
45
<NpmLogo size="32" style={logoStyle} />
46
{siteMetadata.title}
47
</Link>
@@ -62,7 +67,7 @@ function HeaderNavItems({items}) {
67
return (
68
<Flex alignItems="center" color="gray.2">
69
{items.map((item, index) => (
65
- <Link key={index} href={item.url} display="block" color="inherit" ml={4}>
70
+ <Link key={index} href={item.url} sx={{display: 'block', color: 'inherit', ml: 4}}>
71
{item.title}
72
</Link>
73
))}
theme/src/components/nav-drawer.js
+2
-2
@@ -46,7 +46,7 @@ function NavDrawer({location, repositoryUrl}) {
46
<Flex flexDirection="column" flex="1 0 auto" color="gray.7" bg="gray.0">
47
<BorderBox borderWidth={0} borderRadius={0} borderBottomWidth={1} borderColor="gray.7">
48
<Flex py={3} pl={4} pr={3} alignItems="center" justifyContent="space-between" color="gray.1" bg="gray.9">
49
- <Link as={GatsbyLink} to="/" display="inline-block" color="inherit">
49
+ <Link as={GatsbyLink} to="/" sx={{display: 'inline-block', color: 'inherit'}}>
50
{siteMetadata.title}
51
</Link>
52
<DarkButton aria-label="Close" onClick={setClose}>
@@ -81,7 +81,7 @@ function HeaderNavItems({items}) {
81
borderColor="gray.7"
82
p={4}
83
>
84
- <Link key={index} href={item.url} color="inherit" display="block">
84
+ <Link key={index} href={item.url} sx={{color: 'inherit', display: 'block'}}>
85
{item.title}
86
</Link>
87
</BorderBox>
theme/src/components/nav-items.js
+1
-1
@@ -158,7 +158,7 @@ function NavItems({location, repositoryUrl}) {
158
<>
159
{topLevelItems(items, path)}
160
<BorderBox borderWidth={0} borderTopWidth={1} borderRadius={0} py={5} px={4}>
161
- <Link href={repositoryUrl} color="inherit">
161
+ <Link href={repositoryUrl} sx={{color: 'inherit'}}>
162
<Flex justifyContent="space-between" alignItems="center" color="gray.5">
163
GitHub
164
<StyledOcticon icon={LinkExternalIcon} color="gray.5" />
theme/src/components/table-of-contents.js
+1
-1
@@ -14,7 +14,7 @@ function TableOfContents({items, depth = 0, labelId}) {
14
>
15
{items.map(item => (
16
<Box as="li" role="listitem" key={item.url} pl={depth > 0 ? 3 : 0}>
17
- <Link key={item.title} display="inline-block" py={1} href={item.url} color="gray.6">
17
+ <Link key={item.title} href={item.url} sx={{display: 'inline-block', py: 1, color: 'gray.6'}}>
18
{item.title}
19
</Link>
20
{item.items ? <TableOfContents items={item.items} depth={depth + 1} /> : null}
theme/src/hooks/use-search.js
+5
-1
@@ -107,7 +107,11 @@ function useSearch() {
107
case useCombobox.stateChangeTypes.InputBlur:
108
if (isMobile) {
109
// Don't let a blur event change the state of `inputValue` or `isOpen`.
110
- return {...changes, inputValue: state.inputValue, isOpen: state.isOpen}
110
+ return {
111
+ ...changes,
112
+ inputValue: state.inputValue,
113
+ isOpen: state.isOpen,
114
+ }
115
}
116
break
117
}
theme/src/mdx/heading.js
+1
-1
@@ -28,7 +28,7 @@ function MarkdownHeading({children, ...props}) {
28
29
return (
30
<StyledHeading id={id} {...props}>
31
- <Link href={`#${id}`} p={2} ml={-32} color="gray.8" aria-label={`${text} permalink`}>
31
+ <Link href={`#${id}`} sx={{p: 2, ml: -32, color: 'gray.8'}} aria-label={`${text} permalink`}>
32
<LinkIcon className="octicon-link" verticalAlign="middle" />
33
</Link>
34
{children}
theme/src/mdx/prompt.js
+5
-1
@@ -10,7 +10,11 @@ function Prompt({children}) {
10
mb={3}
11
p={3}
12
border={0}
13
- style={{color: 'rgb(57, 58, 52)', backgroundColor: 'rgb(246, 248, 250)', overflow: 'auto'}}
13
+ style={{
14
+ color: 'rgb(57, 58, 52)',
15
+ backgroundColor: 'rgb(246, 248, 250)',
16
+ overflow: 'auto',
17
+ }}
18
>
19
<Text fontFamily="mono" fontSize={1}>
20
{children}
theme/src/mdx/screenshot.js
+6
-1
@@ -15,7 +15,12 @@ function Screenshot(props) {
15
<img
16
src={withPrefix(props.src)}
17
alt={props.alt}
18
- style={{border: 'solid 1px #999999', marginTop: '15px', maxWidth: 'min(100%, 525px)', maxHeight: '300px'}}
18
+ style={{
19
+ border: 'solid 1px #999999',
20
+ marginTop: '15px',
21
+ maxWidth: 'min(100%, 525px)',
22
+ maxHeight: '300px',
23
+ }}
24
/>
25
</div>
26
)
theme/src/page-element.js
+1
-1
@@ -9,7 +9,7 @@ const GlobalStyle = createGlobalStyle`
9
`
10
11
const SkipLinkBase = props => (
12
- <Link {...props} backgroundColor="blue.6" color="white" p={3} href="#skip-nav" fontSize={1}>
12
+ <Link {...props} href="#skip-nav" sx={{backgroundColor: 'blue.6', color: 'white', p: 3, fontSize: 1}}>
13
Skip to content
14
</Link>
15
)