Skip to content

Commit 169ec29

Browse files
author
Emily
authored
Merge pull request #97 from primer/upgrade-components
Upgrade Primer Components
2 parents 11c6f8e + 0d97c14 commit 169ec29

File tree

12 files changed

+313
-274
lines changed

12 files changed

+313
-274
lines changed

theme/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@primer/gatsby-theme-doctocat",
3-
"version": "0.16.3",
3+
"version": "0.16.4",
44
"main": "index.js",
55
"license": "MIT",
66
"scripts": {
@@ -21,7 +21,7 @@
2121
"@babel/preset-react": "^7.0.0",
2222
"@mdx-js/mdx": "^1.0.21",
2323
"@mdx-js/react": "^1.0.21",
24-
"@primer/components": "^13.3.1",
24+
"@primer/components": "^15.1.0",
2525
"@primer/octicons-react": "^9.1.1",
2626
"@styled-system/theme-get": "^5.0.12",
2727
"@testing-library/jest-dom": "^4.1.0",

theme/src/components/blockquote.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import styled from 'styled-components'
22
import themeGet from '@styled-system/theme-get'
33

44
const Blockquote = styled.blockquote`
5-
margin: 0 0 ${themeGet('space.3')}px;
6-
padding: 0 ${themeGet('space.3')}px;
5+
margin: 0 0 ${themeGet('space.3')};
6+
padding: 0 ${themeGet('space.3')};
77
color: ${themeGet('colors.gray.5')};
88
border-left: 0.25em solid ${themeGet('colors.gray.2')};
99

theme/src/components/dark-text-input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const DarkTextInput = styled(TextInput)`
66
* Otherwise, iOS browsers will zoom in when the input is focused.
77
* TODO: Update font-size of TextInput in @primer/components.
88
*/
9-
font-size: ${themeGet('fontSizes.2')}px !important;
9+
font-size: ${themeGet('fontSizes.2')} !important;
1010
color: ${themeGet('colors.white')};
1111
background-color: rgba(255, 255, 255, 0.07);
1212
border: 1px solid transparent;

theme/src/components/description-list.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ const DescriptionList = styled.dl`
66
77
dt {
88
padding: 0;
9-
margin-top: ${themeGet('space.3')}px;
9+
margin-top: ${themeGet('space.3')};
1010
font-size: 1em;
1111
font-style: italic;
1212
font-weight: ${themeGet('fontWeights.bold')};
1313
}
1414
1515
dd {
16-
padding: 0 ${themeGet('space.3')}px;
17-
margin: 0 0 ${themeGet('space.3')}px;
16+
padding: 0 ${themeGet('space.3')};
17+
margin: 0 0 ${themeGet('space.3')};
1818
}
1919
`
2020

theme/src/components/heading.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import textContent from 'react-addons-text-content'
77
import styled from 'styled-components'
88

99
const StyledHeading = styled(Heading)`
10-
margin-top: ${themeGet('space.4')}px;
11-
margin-bottom: ${themeGet('space.3')}px;
10+
margin-top: ${themeGet('space.4')};
11+
margin-bottom: ${themeGet('space.3')};
1212
1313
& .octicon-link {
1414
visibility: hidden;
@@ -46,31 +46,31 @@ function MarkdownHeading({children, ...props}) {
4646
}
4747

4848
const StyledH1 = styled(StyledHeading).attrs({as: 'h1'})`
49-
padding-bottom: ${themeGet('space.1')}px;
50-
font-size: ${themeGet('fontSizes.5')}px;
49+
padding-bottom: ${themeGet('space.1')};
50+
font-size: ${themeGet('fontSizes.5')};
5151
border-bottom: 1px solid ${themeGet('colors.gray.2')};
5252
`
5353

5454
const StyledH2 = styled(StyledHeading).attrs({as: 'h2'})`
55-
padding-bottom: ${themeGet('space.1')}px;
56-
font-size: ${themeGet('fontSizes.4')}px;
55+
padding-bottom: ${themeGet('space.1')};
56+
font-size: ${themeGet('fontSizes.4')};
5757
border-bottom: 1px solid ${themeGet('colors.gray.2')};
5858
`
5959

6060
const StyledH3 = styled(StyledHeading).attrs({as: 'h3'})`
61-
font-size: ${themeGet('fontSizes.3')}px;
61+
font-size: ${themeGet('fontSizes.3')};
6262
`
6363

6464
const StyledH4 = styled(StyledHeading).attrs({as: 'h4'})`
65-
font-size: ${themeGet('fontSizes.2')}px;
65+
font-size: ${themeGet('fontSizes.2')};
6666
`
6767

6868
const StyledH5 = styled(StyledHeading).attrs({as: 'h5'})`
69-
font-size: ${themeGet('fontSizes.1')}px;
69+
font-size: ${themeGet('fontSizes.1')};
7070
`
7171

7272
const StyledH6 = styled(StyledHeading).attrs({as: 'h6'})`
73-
font-size: ${themeGet('fontSizes.1')}px;
73+
font-size: ${themeGet('fontSizes.1')};
7474
color: ${themeGet('colors.gray.5')};
7575
`
7676

theme/src/components/horizontal-rule.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import styled from 'styled-components'
22
import themeGet from '@styled-system/theme-get'
33

44
const HorizontalRule = styled.hr`
5-
height: ${themeGet('space.1')}px;
5+
height: ${themeGet('space.1')};
66
padding: 0;
7-
margin: ${themeGet('space.4')}px 0;
7+
margin: ${themeGet('space.4')} 0;
88
background-color: ${themeGet('colors.gray.2')};
99
border: 0;
1010
`

theme/src/components/inline-code.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const InlineCode = styled.code`
66
font-family: ${themeGet('fonts.mono')};
77
font-size: 85%;
88
background-color: ${themeGet('colors.gray.1')};
9-
border-radius: ${themeGet('radii.1')}px;
9+
border-radius: ${themeGet('radii.1')};
1010
`
1111

1212
export default InlineCode

theme/src/components/list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ const List = styled.ul`
1515
}
1616
1717
li > p {
18-
margin-top: ${themeGet('space.3')}px;
18+
margin-top: ${themeGet('space.3')};
1919
}
2020
2121
li + li {
22-
margin-top: ${themeGet('space.1')}px;
22+
margin-top: ${themeGet('space.1')};
2323
}
2424
`
2525

theme/src/components/nav-dropdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function NavDropdown({title, children}) {
3838

3939
export const NavDropdownItem = styled.a`
4040
display: block;
41-
padding: ${themeGet('space.2')}px ${themeGet('space.3')}px;
41+
padding: ${themeGet('space.2')} ${themeGet('space.3')};
4242
color: inherit;
4343
text-decoration: none;
4444

theme/src/components/paragraph.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import styled from 'styled-components'
22
import themeGet from '@styled-system/theme-get'
33

44
const Paragraph = styled.p`
5-
margin: 0 0 ${themeGet('space.3')}px;
5+
margin: 0 0 ${themeGet('space.3')};
66
`
77

88
export default Paragraph

0 commit comments

Comments
 (0)