Skip to content

Commit a38b11b

Browse files
committed
Add theme preset polaris
1 parent 4c98d59 commit a38b11b

File tree

6 files changed

+87
-1
lines changed

6 files changed

+87
-1
lines changed

packages/preset-polaris/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# [@theme-ui/preset-polaris](https://theme-ui.com/presets/polaris)
2+
3+
Theme UI includes `@theme-ui/preset-polaris` which can be used as an example or
4+
starting point for extending your own themes.
5+
6+
```sh
7+
npm i @theme-ui/preset-polaris
8+
```
9+
10+
```jsx
11+
// example theme
12+
import theme from '@theme-ui/preset-polaris'
13+
14+
export default {
15+
...theme,
16+
styles: {
17+
...theme,
18+
},
19+
}
20+
```
21+
22+
[See all built-in presets][demo]
23+
24+
## Contributing
25+
26+
We'd love to have more presets added to the Theme UI project.
27+
If you'd like to add a new preset or improve upon the existing ones, please open an [issue][] or [pull request][].
28+
29+
[issue]: https://github.com/system-ui/theme-ui/issues
30+
[pull request]: https://github.com/system-ui/theme-ui/pulls
31+
32+
[demo]: https://theme-ui.com/demo
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('../../babel.config')

packages/preset-polaris/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@theme-ui/preset-polaris",
3+
"version": "0.1.0",
4+
"main": "dist/index.js",
5+
"module": "dist/index.esm.js",
6+
"author": "Yuraima Estevez",
7+
"license": "MIT",
8+
"scripts": {
9+
"prepare": "microbundle --no-compress",
10+
"watch": "microbundle watch --no-compress"
11+
},
12+
"dependencies": {
13+
"@theme-ui/preset-base": "^0.2.44"
14+
},
15+
"publishConfig": {
16+
"access": "public"
17+
}
18+
}

packages/preset-polaris/src/index.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import base from '@theme-ui/preset-base'
2+
3+
const text = '"San Francisco", Roboto, "Segoe UI", "Helvetica Neue", sans-serif'
4+
export const polaris = {
5+
...base,
6+
colors: {
7+
text: '#454f5b',
8+
background: '#fff',
9+
primary: '#5C6AC4',
10+
secondary: '#006FBB',
11+
highlight: '#47C1BF',
12+
muted: '#e6e6e6',
13+
gray: '#DFE3E8',
14+
accent: '#F49342',
15+
darken: '#00044C',
16+
},
17+
fonts: {
18+
body: text,
19+
heading: text,
20+
moonospace: 'Menlo, monospace',
21+
},
22+
fontWeights: {
23+
body: 400,
24+
heading: 600,
25+
bold: 700,
26+
},
27+
lineHeights: {
28+
body: 1.75,
29+
heading: 1.25,
30+
},
31+
}
32+
33+
export default polaris

packages/presets/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"@theme-ui/preset-swiss": "^0.2.40",
2222
"@theme-ui/preset-system": "^0.2.40",
2323
"@theme-ui/preset-tailwind": "^0.2.42",
24-
"@theme-ui/preset-tosh": "^0.2.40"
24+
"@theme-ui/preset-tosh": "^0.2.40",
25+
"@theme-ui/preset-polaris": "^0.1.0"
2526
},
2627
"publishConfig": {
2728
"access": "public"

packages/presets/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ export { default as tosh } from '@theme-ui/preset-tosh'
1111
export { default as bootstrap } from '@theme-ui/preset-bootstrap'
1212
export { default as bulma } from '@theme-ui/preset-bulma'
1313
export { default as tailwind } from '@theme-ui/preset-tailwind'
14+
export { default as polaris } from '@theme-ui/preset-polaris'

0 commit comments

Comments
 (0)