Skip to content

Commit

Permalink
feat: new theme and react-forms packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Zivolo committed Dec 5, 2018
1 parent 5a243c4 commit 61a44a0
Show file tree
Hide file tree
Showing 30 changed files with 1,176 additions and 5 deletions.
Empty file added packages/react-forms/README.md
Empty file.
24 changes: 24 additions & 0 deletions packages/react-forms/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "@quid/react-forms",
"version": "1.0.0",
"description": "Collection of form-related React components, such as buttons, inputs, etc...",
"main": "dist/index.js",
"main:umd": "dist/index.umd.js",
"module": "dist/index.es.js",
"license": "MIT",
"scripts": {
"start": "microbundle watch",
"prepare": "microbundle build && flow-copy-source --ignore '{__mocks__/*,*.test}.js' src dist"
},
"dependencies": {
"@emotion/core": "^10.0.2",
"@emotion/styled": "^10.0.2",
"@quid/theme": "^1.0.0",
"color": "^3.1.0",
"react-router-dom": "^4.3.1"
},
"devDependencies": {
"flow-copy-source": "^2.0.2",
"microbundle": "^0.8.3"
}
}
217 changes: 217 additions & 0 deletions packages/react-forms/src/Button/Button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
The `Button` component is used to let the user perform an action
once it's clicked:

```js
<Button importance="primary">I'm a button</Button>
```
These are all the supported style variations:
```js
<table className="DemoTable">
<thead>
<tr>
<th />
<th>Default</th>
<th>Disabled</th>
</tr>
</thead>
<tbody>
<tr>
<td>Primary</td>
<td>
<Button importance="primary">Button</Button>
</td>
<td>
<Button importance="primary" disabled>
Button
</Button>
</td>
</tr>
<tr>
<td>Primary Small</td>
<td>
<Button importance="primary" size="small">
Button
</Button>
</td>
<td>
<Button importance="primary" size="small" disabled>
Button
</Button>
</td>
</tr>
<tr>
<td>Primary with Icon</td>
<td>
<Button importance="primary">
<x-icon name="scatter" />
</Button>
</td>
<td>
<Button importance="primary" disabled>
<x-icon name="scatter" />
</Button>
</td>
</tr>
<tr>
<td>Primary Small with Icon</td>
<td>
<Button importance="primary" size="small">
<x-icon name="scatter" />
</Button>
</td>
<td>
<Button importance="primary" size="small" disabled>
<x-icon name="scatter" />
</Button>
</td>
</tr>
<tr>
<td>Primary with both</td>
<td>
<Button importance="primary">
<x-icon name="download" /> Button
</Button>
</td>
<td>
<Button importance="primary" disabled>
<x-icon name="download" /> Button
</Button>
</td>
</tr>
<tr>
<td>Primary Small with both</td>
<td>
<Button importance="primary" size="small">
<x-icon name="download" /> Button
</Button>
</td>
<td>
<Button importance="primary" size="small" disabled>
<x-icon name="download" /> Button
</Button>
</td>
</tr>
<tr>
<td colSpan="3">
<hr />
</td>
</tr>
<tr>
<td>Secondary</td>
<td>
<Button importance="secondary">Button</Button>
</td>
<td>
<Button importance="secondary" disabled>
Button
</Button>
</td>
</tr>
<tr>
<td>Secondary Small</td>
<td>
<Button importance="secondary" size="small">
Button
</Button>
</td>
<td>
<Button importance="secondary" size="small" disabled>
Button
</Button>
</td>
</tr>
<tr>
<td>Secondary with Icon</td>
<td>
<Button importance="secondary">
<x-icon name="scatter" />
</Button>
</td>
<td>
<Button importance="secondary" disabled>
<x-icon name="scatter" />
</Button>
</td>
</tr>
<tr>
<td>Secondary Small with Icon</td>
<td>
<Button importance="secondary" size="small">
<x-icon name="scatter" />
</Button>
</td>
<td>
<Button importance="secondary" size="small" disabled>
<x-icon name="scatter" />
</Button>
</td>
</tr>
<tr>
<td>Secondary with both</td>
<td>
<Button importance="secondary">
<x-icon name="download" /> Button
</Button>
</td>
<td>
<Button importance="secondary" disabled>
<x-icon name="download" /> Button
</Button>
</td>
</tr>
<tr>
<td>Secondary Small with both</td>
<td>
<Button importance="secondary" size="small">
<x-icon name="download" /> Button
</Button>
</td>
<td>
<Button importance="secondary" size="small" disabled>
<x-icon name="download" /> Button
</Button>
</td>
</tr>
<tr>
<td colSpan="3">
<hr />
</td>
</tr>
<tr>
<td>Okay</td>
<td>
<Button importance="okay">Button</Button>
</td>
<td>
<Button importance="okay" disabled>
Button
</Button>
</td>
</tr>
<tr>
<td>Warning</td>
<td>
<Button importance="warning">Button</Button>
</td>
<td>
<Button importance="warning" disabled>
Button
</Button>
</td>
</tr>
<tr>
<td>Hazard</td>
<td>
<Button importance="hazard">Button</Button>
</td>
<td>
<Button importance="hazard" disabled>
Button
</Button>
</td>
</tr>
</tbody>
</table>
```
Loading

0 comments on commit 61a44a0

Please sign in to comment.