Skip to content

Commit ef8982e

Browse files
committed
Format
1 parent f4f44a1 commit ef8982e

File tree

9 files changed

+49
-53
lines changed

9 files changed

+49
-53
lines changed

CODE_OF_CONDUCT.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
88

99
Examples of behavior that contributes to creating a positive environment include:
1010

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
1616

1717
Examples of unacceptable behavior by participants include:
1818

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
2424

2525
## Our Responsibilities
2626

CONTRIBUTING.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Contributing
32

43
Hi! We're looking for some help, and we're excited that you're interested!
@@ -42,4 +41,3 @@ yarn test --watch
4241
[yarn workspaces]: https://yarnpkg.com/en/docs/workspaces
4342
[lerna]: https://github.com/lerna/lerna
4443
[jest]: https://jestjs.io/
45-

packages/docs/src/components/edit-link.js

+5-8
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@
22
import { Location } from '@reach/router'
33
import { jsx } from 'theme-ui'
44

5-
65
const getHREF = (base, location) => {
76
if (location.pathname === '/') return false
87
return base + location.pathname.replace(/\/+$/, '') + '.mdx'
98
}
109

11-
export const EditLink = ({
12-
base,
13-
children,
14-
...props
15-
}) => (
10+
export const EditLink = ({ base, children, ...props }) => (
1611
<Location
1712
children={({ location }) => {
1813
const href = getHREF(base, location)
@@ -26,7 +21,8 @@ export const EditLink = ({
2621
color: 'inherit',
2722
fontSize: 1,
2823
my: 4,
29-
}}>
24+
}}
25+
>
3026
{children}
3127
</a>
3228
)
@@ -35,7 +31,8 @@ export const EditLink = ({
3531
)
3632

3733
EditLink.defaultProps = {
38-
base: 'https://github.com/system-ui/theme-ui/edit/master/packages/docs/src/pages',
34+
base:
35+
'https://github.com/system-ui/theme-ui/edit/master/packages/docs/src/pages',
3936
children: 'Edit the page on GitHub',
4037
}
4138

packages/docs/src/pages/api.mdx

+21-19
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ css(styleObject)(theme)
2525
<div css={css(styles)} />
2626
```
2727

28-
Argument | Type | Description
29-
---|---|---
30-
`styleObject` | Object | a theme-aware style object with support for responsive array values and Styled System prop shortcuts
31-
`theme` | Object | the Emotion theming context object
28+
| Argument | Type | Description |
29+
| ------------- | ------ | ---------------------------------------------------------------------------------------------------- |
30+
| `styleObject` | Object | a theme-aware style object with support for responsive array values and Styled System prop shortcuts |
31+
| `theme` | Object | the Emotion theming context object |
3232

3333
### `jsx`
3434

@@ -40,13 +40,14 @@ The `jsx` export is a React create element function intended for use as a custom
4040
/** @jsx jsx */
4141
import { jsx } from 'theme-ui'
4242

43-
export default props =>
43+
export default props => (
4444
<div
4545
{...props}
4646
css={{
4747
color: 'primary',
4848
}}
4949
/>
50+
)
5051
```
5152

5253
### `ThemeProvider`
@@ -55,11 +56,11 @@ The `ThemeProvider` component is a wrapper around Emotion's `ThemeProvider` and
5556
It provides default styled components to MDX content that pick up values from `theme.styles`.
5657
It also handles color mode state.
5758

58-
Prop | Type | Description
59-
---|---|---
60-
`theme` | Object | Theming context object
61-
`components` | Object | Optional custom MDX components
62-
`children` | Node | React children
59+
| Prop | Type | Description |
60+
| ------------ | ------ | ------------------------------ |
61+
| `theme` | Object | Theming context object |
62+
| `components` | Object | Optional custom MDX components |
63+
| `children` | Node | React children |
6364

6465
### `useThemeUI`
6566

@@ -89,7 +90,7 @@ The `useColorMode` hook returns an array with two values: the current color mode
8990
The color mode state can be any string and should match the name of a color mode defined in `theme.colors.modes` or be a name for the default color mode.
9091

9192
```js
92-
const [ colorMode, setColorMode ] = useColorMode()
93+
const [colorMode, setColorMode] = useColorMode()
9394
```
9495

9596
### `Styled`
@@ -105,21 +106,21 @@ These are primarily meant to be used as a mechanism to use styles defined in a `
105106

106107
The `Styled` components include the same props as components created with [`@emotion/styled`](https://emotion.sh/docs/styled).
107108

108-
Prop | Type | Description
109-
---|---|---
110-
`as` | String or Component | Changes the underlying rendered element
109+
| Prop | Type | Description |
110+
| ---- | ------------------- | --------------------------------------- |
111+
| `as` | String or Component | Changes the underlying rendered element |
111112

112113
### `Box`
113114

114115
The `Box` component is a primitive layout component with Styled System props, similar to [Rebass's `Box` component](https://rebassjs.org/Box/) .
115116

116117
The `Box` component includes all [Styled System space props](https://styled-system.com/api#space), as well as the following.
117118

118-
Prop | Type | Description
119-
---|---|---
120-
`color` | String | Foreground (text) color
121-
`bg`, `backgroundColor` | String | Background color
122-
`css` | Object | Style object
119+
| Prop | Type | Description |
120+
| ----------------------- | ------ | ----------------------- |
121+
| `color` | String | Foreground (text) color |
122+
| `bg`, `backgroundColor` | String | Background color |
123+
| `css` | Object | Style object |
123124

124125
<!-- todo: note about deprecating other style props -->
125126

@@ -152,6 +153,7 @@ The `Container` component is an extension of the `Box` component with a max-widt
152153
The `Footer` component is an extension of the `Box` component, intended for use as a page footer.
153154

154155
## `gatsby-theme-ui`
156+
155157
## `gatsby-theme-ui`
156158

157159
[styled-system/css]: https://styled-system.com/css

packages/docs/src/pages/hooks.mdx

+4-5
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ import React from 'react'
3030
import { useColorMode } from 'theme-ui'
3131

3232
export default props => {
33-
const [ colorMode, setColorMode ] = useColorMode()
33+
const [colorMode, setColorMode] = useColorMode()
3434
return (
3535
<button
3636
onClick={e => {
3737
setColorMode(colorMode === 'light' ? 'dark' : 'light')
38-
}}>
39-
Toggle
40-
{' '}
41-
{colorMode === 'light' ? 'Dark' : 'Light'}
38+
}}
39+
>
40+
Toggle {colorMode === 'light' ? 'Dark' : 'Light'}
4241
</button>
4342
)
4443
}

packages/tachyons/src/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ const KEY_MAPPING = {
1010
lineHeights: 'lineHeight',
1111
letterSpacings: 'letterSpacing',
1212
size: ['heights', 'maxHeights', 'widths', 'maxWidths'],
13-
zIndices: 'zIndex'
13+
zIndices: 'zIndex',
1414
}
1515

1616
export default theme => {
1717
const transformedTheme = Object.entries(theme).reduce((acc, [key, value]) => {
1818
if (!KEY_MAPPING[key]) {
1919
return {
2020
...acc,
21-
[key]: value
21+
[key]: value,
2222
}
2323
} else if (Array.isArray(KEY_MAPPING[key])) {
2424
KEY_MAPPING[key].forEach(tachyonsKey => {
@@ -29,7 +29,7 @@ export default theme => {
2929
} else {
3030
return {
3131
...acc,
32-
[KEY_MAPPING[key]]: value
32+
[KEY_MAPPING[key]]: value,
3333
}
3434
}
3535
}, {})

packages/tachyons/test/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const theme = {
2424
},
2525
lineHeights: [1.5, 1.125],
2626
space: [0, 2, 3, 4, 5, 6],
27-
size: ['10em', '20em', '30em', '40em']
27+
size: ['10em', '20em', '30em', '40em'],
2828
}
2929

3030
it('transforms a theme config to a Tachyons config', () => {

packages/tailwind/src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ const KEY_MAPPING = {
99
lineHeights: 'lineHeight',
1010
letterSpacings: 'letterSpacing',
1111
size: ['height', 'maxHeight', 'width', 'maxWidth'],
12-
zIndices: 'zIndex'
12+
zIndices: 'zIndex',
1313
}
1414

1515
export default (theme, config = {}) => {
1616
const transformedTheme = Object.entries(theme).reduce((acc, [key, value]) => {
1717
if (!KEY_MAPPING[key]) {
1818
return {
1919
...acc,
20-
[key]: value
20+
[key]: value,
2121
}
2222
} else if (Array.isArray(KEY_MAPPING[key])) {
2323
KEY_MAPPING[key].forEach(twKey => {
@@ -28,13 +28,13 @@ export default (theme, config = {}) => {
2828
} else {
2929
return {
3030
...acc,
31-
[KEY_MAPPING[key]]: value
31+
[KEY_MAPPING[key]]: value,
3232
}
3333
}
3434
}, {})
3535

3636
return {
3737
...config,
38-
theme: transformedTheme
38+
theme: transformedTheme,
3939
}
4040
}

packages/tailwind/test/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const theme = {
3030
heading: 1.125,
3131
},
3232
space: [0, 2, 3, 4, 5, 6],
33-
size: ['10em', '20em', '30em', '40em']
33+
size: ['10em', '20em', '30em', '40em'],
3434
}
3535

3636
const toJS = theme => `

0 commit comments

Comments
 (0)