Skip to content

Commit

Permalink
Merge pull request #54 from primer/release-0.0.3-beta
Browse files Browse the repository at this point in the history
v0.0.3-beta release tracking
  • Loading branch information
shawnbot authored Jun 8, 2018
2 parents 200ce11 + af299fc commit 5f49fac
Show file tree
Hide file tree
Showing 44 changed files with 2,931 additions and 2,288 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ language: node_js

node_js:
- 8

script:
- npm test
- npm run build
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ Run app with: `npm run start`

Build docs before publishing: `npm run build`

### Testing

We test our components with [Jest](https://facebook.github.io/jest/) and
[react-test-renderer](https://reactjs.org/docs/test-renderer.html). You can run
the tests locally with `npm test` (or `npm t`). To run the tests as you work,
run Jest in watch mode with:

```
npm t -- --watch
```

See [`src/__tests__/example.js`](src/__tests/example.js) for an
example of how we're testing our components.

## Principles

Expand Down
6 changes: 6 additions & 0 deletions docs/CSS/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!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; }
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
line-height: 1.5;
}</style></div><script src="/primer-react/bundle.js"></script>
1 change: 1 addition & 0 deletions docs/GitHubAvatar/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +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>
1 change: 1 addition & 0 deletions docs/Meta/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +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>
6 changes: 6 additions & 0 deletions docs/Page/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!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; }
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
line-height: 1.5;
}</style></head><body class="text-dark-gray"></body></div><script src="/primer-react/bundle.js"></script>
1 change: 1 addition & 0 deletions docs/Swatch/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +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>
59 changes: 30 additions & 29 deletions docs/bundle.js

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions docs/index.html

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions examples/CSS.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react'
import {theme} from '../src'

const CSS = ({css}) => (
<style dangerouslySetInnerHTML={{__html: css}} />
)

const fonts = theme.fonts
.map(name => name.indexOf(' ') > -1 ? `"${name}"` : name)
.join(', ')

CSS.defaultProps = {
css: `
* { box-sizing: border-box; }
body {
margin: 0;
font-family: ${fonts};
line-height: ${theme.lineHeight};
}
`
}

export default CSS
10 changes: 4 additions & 6 deletions src/Meta.js → examples/Meta.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import React from 'react'

const primerPackages = [
'primer-box',
'primer-breadcrumb',
// 'primer-box',
// 'primer-breadcrumb',
'primer-buttons',
'primer-forms',
'primer-layout',
'primer-marketing',
'primer-navigation',
// 'primer-marketing',
// 'primer-navigation',
'primer-product',
// 'primer-support',
// 'primer-table',
'primer-tooltips',
'primer-truncate',
'primer-utilities',
]

Expand Down
11 changes: 2 additions & 9 deletions src/Page.js → examples/Page.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
import CSS from './CSS'
import Meta from './Meta'
import React from 'react'
import theme from './theme'
import {ThemeProvider} from 'styled-components'

// Generic page wrapper component
const Page = ({children}) => (
<React.Fragment>
<head>
<title>Primer React</title>
<Meta />
<CSS />
</head>
<body>
<ThemeProvider theme={theme}>
<div className='text-dark-gray'>
{children}
</div>
</ThemeProvider>
<body className='text-dark-gray'>
{children}
</body>
</React.Fragment>
)
Expand Down
Loading

0 comments on commit 5f49fac

Please sign in to comment.