Skip to content

Commit 5f49fac

Browse files
authored
Merge pull request #54 from primer/release-0.0.3-beta
v0.0.3-beta release tracking
2 parents 200ce11 + af299fc commit 5f49fac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2931
-2288
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ language: node_js
22

33
node_js:
44
- 8
5+
6+
script:
7+
- npm test
8+
- npm run build

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ Run app with: `npm run start`
2626

2727
Build docs before publishing: `npm run build`
2828

29+
### Testing
30+
31+
We test our components with [Jest](https://facebook.github.io/jest/) and
32+
[react-test-renderer](https://reactjs.org/docs/test-renderer.html). You can run
33+
the tests locally with `npm test` (or `npm t`). To run the tests as you work,
34+
run Jest in watch mode with:
35+
36+
```
37+
npm t -- --watch
38+
```
39+
40+
See [`src/__tests__/example.js`](src/__tests/example.js) for an
41+
example of how we're testing our components.
2942

3043
## Principles
3144

docs/CSS/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!DOCTYPE html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Compositor x0"><title>primer-react</title><style>*{box-sizing:border-box}body{margin:0;font-family:system-ui,sans-serif}</style></head><div id="root"><style>* { box-sizing: border-box; }
2+
body {
3+
margin: 0;
4+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
5+
line-height: 1.5;
6+
}</style></div><script src="/primer-react/bundle.js"></script>

docs/GitHubAvatar/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Compositor x0"><title>primer-react</title><style>*{box-sizing:border-box}body{margin:0;font-family:system-ui,sans-serif}</style></head><div id="root"><img class="avatar avatar-small" src="https://avatars.githubusercontent.com/undefined?v=3&amp;s=40" width="20" height="20"></div><script src="/primer-react/bundle.js"></script>

docs/Meta/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Compositor x0"><title>primer-react</title><style>*{box-sizing:border-box}body{margin:0;font-family:system-ui,sans-serif}</style></head><div id="root"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Compositor X0"><link rel="stylesheet" href="https://unpkg.com/primer-buttons/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-forms/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-layout/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-product/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-tooltips/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-utilities/build/build.css"><link rel="icon" href="assets/favicon.png"><link rel="apple-touch-icon" href="assets/apple-touch-icon.png"><meta name="og:title" content="Primer React"><meta name="description" content="Primer components built with React.js."></div><script src="/primer-react/bundle.js"></script>

docs/Page/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!DOCTYPE html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Compositor x0"><title>primer-react</title><style>*{box-sizing:border-box}body{margin:0;font-family:system-ui,sans-serif}</style></head><div id="root"><head><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Compositor X0"><link rel="stylesheet" href="https://unpkg.com/primer-buttons/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-forms/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-layout/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-product/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-tooltips/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-utilities/build/build.css"><link rel="icon" href="assets/favicon.png"><link rel="apple-touch-icon" href="assets/apple-touch-icon.png"><meta name="og:title" content="Primer React"><meta name="description" content="Primer components built with React.js."><style>* { box-sizing: border-box; }
2+
body {
3+
margin: 0;
4+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
5+
line-height: 1.5;
6+
}</style></head><body class="text-dark-gray"></body></div><script src="/primer-react/bundle.js"></script>

docs/Swatch/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Compositor x0"><title>primer-react</title><style>*{box-sizing:border-box}body{margin:0;font-family:system-ui,sans-serif}</style></head><div id="root"><div match="[object Object]" location="[object Object]" history="[object Object]" staticcontext="[object Object]"><div class="m-1 mt-3 p-6"></div><h3 class="px-1 m-0 f4">.</h3><span class="px-1"></span></div></div><script src="/primer-react/bundle.js"></script>

docs/bundle.js

Lines changed: 30 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 3 additions & 5 deletions
Large diffs are not rendered by default.

examples/CSS.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from 'react'
2+
import {theme} from '../src'
3+
4+
const CSS = ({css}) => (
5+
<style dangerouslySetInnerHTML={{__html: css}} />
6+
)
7+
8+
const fonts = theme.fonts
9+
.map(name => name.indexOf(' ') > -1 ? `"${name}"` : name)
10+
.join(', ')
11+
12+
CSS.defaultProps = {
13+
css: `
14+
* { box-sizing: border-box; }
15+
body {
16+
margin: 0;
17+
font-family: ${fonts};
18+
line-height: ${theme.lineHeight};
19+
}
20+
`
21+
}
22+
23+
export default CSS

0 commit comments

Comments
 (0)