Skip to content

Commit bee61ff

Browse files
committed
fix: run system props codemod
1 parent 3b02115 commit bee61ff

File tree

10 files changed

+31
-14
lines changed

10 files changed

+31
-14
lines changed

theme/src/components/contributors.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@ function Contributors({logins, latestCommit}) {
2828
{logins.length} {pluralize('contributor', logins.length)}
2929
</Text>
3030
{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}}>
3232
{/* eslint-disable-next-line primer-react/a11y-tooltip-interactive-trigger */}
3333
<Tooltip key={login} aria-label={login}>
3434
<Avatar src={`https://github.com/${login}.png?size=40`} alt={login} />
3535
</Tooltip>
3636
</Link>
3737
))}
3838
</Flex>
39-
4039
{latestCommit ? (
4140
<Text fontSize={1} color="gray.7" mt={1}>
4241
Last edited by <Link href={`https://github.com/${latestCommit.login}`}>{latestCommit.login}</Link> on{' '}

theme/src/components/header.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ function Header({location, repositoryUrl}) {
2323
const search = useSearch()
2424

2525
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+
}
2732

2833
return (
2934
<Box position="sticky" role="banner">
@@ -36,7 +41,7 @@ function Header({location, repositoryUrl}) {
3641
bg="#333333"
3742
>
3843
<Flex alignItems="center">
39-
<Link as={GatsbyLink} to="/" style={titleStyle} mr={4}>
44+
<Link as={GatsbyLink} to="/" style={titleStyle} sx={{mr: 4}}>
4045
<NpmLogo size="32" style={logoStyle} />
4146
{siteMetadata.title}
4247
</Link>
@@ -62,7 +67,7 @@ function HeaderNavItems({items}) {
6267
return (
6368
<Flex alignItems="center" color="gray.2">
6469
{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}}>
6671
{item.title}
6772
</Link>
6873
))}

theme/src/components/nav-drawer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function NavDrawer({location, repositoryUrl}) {
4646
<Flex flexDirection="column" flex="1 0 auto" color="gray.7" bg="gray.0">
4747
<BorderBox borderWidth={0} borderRadius={0} borderBottomWidth={1} borderColor="gray.7">
4848
<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'}}>
5050
{siteMetadata.title}
5151
</Link>
5252
<DarkButton aria-label="Close" onClick={setClose}>
@@ -81,7 +81,7 @@ function HeaderNavItems({items}) {
8181
borderColor="gray.7"
8282
p={4}
8383
>
84-
<Link key={index} href={item.url} color="inherit" display="block">
84+
<Link key={index} href={item.url} sx={{color: 'inherit', display: 'block'}}>
8585
{item.title}
8686
</Link>
8787
</BorderBox>

theme/src/components/nav-items.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function NavItems({location, repositoryUrl}) {
158158
<>
159159
{topLevelItems(items, path)}
160160
<BorderBox borderWidth={0} borderTopWidth={1} borderRadius={0} py={5} px={4}>
161-
<Link href={repositoryUrl} color="inherit">
161+
<Link href={repositoryUrl} sx={{color: 'inherit'}}>
162162
<Flex justifyContent="space-between" alignItems="center" color="gray.5">
163163
GitHub
164164
<StyledOcticon icon={LinkExternalIcon} color="gray.5" />

theme/src/components/table-of-contents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function TableOfContents({items, depth = 0, labelId}) {
1414
>
1515
{items.map(item => (
1616
<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'}}>
1818
{item.title}
1919
</Link>
2020
{item.items ? <TableOfContents items={item.items} depth={depth + 1} /> : null}

theme/src/hooks/use-search.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ function useSearch() {
107107
case useCombobox.stateChangeTypes.InputBlur:
108108
if (isMobile) {
109109
// 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+
}
111115
}
112116
break
113117
}

theme/src/mdx/heading.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function MarkdownHeading({children, ...props}) {
2828

2929
return (
3030
<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`}>
3232
<LinkIcon className="octicon-link" verticalAlign="middle" />
3333
</Link>
3434
{children}

theme/src/mdx/prompt.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ function Prompt({children}) {
1010
mb={3}
1111
p={3}
1212
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+
}}
1418
>
1519
<Text fontFamily="mono" fontSize={1}>
1620
{children}

theme/src/mdx/screenshot.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ function Screenshot(props) {
1515
<img
1616
src={withPrefix(props.src)}
1717
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+
}}
1924
/>
2025
</div>
2126
)

theme/src/page-element.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const GlobalStyle = createGlobalStyle`
99
`
1010

1111
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}}>
1313
Skip to content
1414
</Link>
1515
)

0 commit comments

Comments
 (0)