Skip to content

Commit 2bcc566

Browse files
author
Alyssa
committed
feat(radio): radio button added
1 parent 9c87ec4 commit 2bcc566

File tree

16 files changed

+659
-609
lines changed

16 files changed

+659
-609
lines changed

.eslintrc.json

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
11
{
2-
"extends": [
3-
"eslint:recommended",
4-
"airbnb-base",
5-
"plugin:prettier/recommended",
6-
"plugin:react/recommended",
7-
"plugin:jest/recommended"
8-
],
9-
"rules": {
10-
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
11-
},
12-
"env": {
13-
"es6": true,
14-
"browser": true,
15-
"node": true
16-
},
17-
"settings": {
18-
"react": {
19-
"createClass": "createReactClass",
20-
"pragma": "React",
21-
"version": "detect"
22-
},
23-
"propWrapperFunctions": [
24-
"forbidExtraProps",
25-
{ "property": "freeze", "object": "Object" },
26-
{ "property": "myFavoriteWrapper" }
27-
],
28-
"linkComponents": ["Hyperlink", { "name": "Link", "linkAttribute": "to" }]
29-
}
2+
"extends": ["react-app"]
303
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"cSpell.words": [
3+
"themify"
4+
]
5+
}

package.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,13 @@
7979
]
8080
},
8181
"devDependencies": {
82-
"@babel/polyfill": "^7.4.3",
83-
"@babel/preset-env": "^7.4.2",
8482
"@commitlint/cli": "^7.5.2",
8583
"@commitlint/config-conventional": "^7.5.0",
8684
"@semantic-release/changelog": "^3.0.2",
8785
"@semantic-release/git": "^7.0.8",
8886
"babel-preset-es2015-rollup": "^3.0.0",
8987
"commitizen": "^3.0.7",
9088
"cz-conventional-changelog": "^2.1.0",
91-
"eslint-config-airbnb-base": "^13.1.0",
92-
"eslint-config-prettier": "^4.1.0",
93-
"eslint-plugin-import": "^2.16.0",
94-
"eslint-plugin-jest": "^22.4.1",
95-
"eslint-plugin-prettier": "^3.0.1",
96-
"eslint-plugin-react": "^7.12.4",
9789
"husky": "^1.3.1",
9890
"lint-staged": "^8.1.5",
9991
"mdx": "^0.3.1",

src/App.js

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import React, { useState } from 'react';
22
import elements from './elements/elements';
3-
import ButtonPage from './elements/button/ButtonPage.jsx';
4-
import TagPage from './elements/tag/TagPage.jsx';
5-
import CheckboxPage from './elements/checkbox/CheckboxPage.jsx';
6-
import InputPage from './elements/input/InputPage.jsx';
7-
import NumberInputPage from './elements/numberinput/NumberInputPage.jsx';
8-
import ListPage from './elements/list/ListPage.jsx';
3+
import ButtonPage from './elements/button/ButtonPage';
4+
import TagPage from './elements/tag/TagPage';
5+
import CheckboxPage from './elements/checkbox/CheckboxPage';
6+
import InputPage from './elements/input/InputPage';
7+
import NumberInputPage from './elements/numberinput/NumberInputPage';
8+
import ListPage from './elements/list/ListPage';
9+
import RadioPage from './elements/radio/RadioPage';
910
import './base_bundle_entry.scss';
1011

1112
/* TODO: remove this import, the css itself and the icont font files,
@@ -53,12 +54,11 @@ function App() {
5354
))}
5455
</div>
5556
<div
56-
className="zep-grid__col zep-grid__col--9-12"
57+
className="zep-grid__col zep-grid__col--xs-5-6"
5758
style={{ paddingTop: 45 }}
5859
>
5960
{content === 'welcome' && (
60-
// <p>Welcome to the Zeppelin Element Library</p>
61-
<ListPage />
61+
<p>Welcome to the Zeppelin Element Library</p>
6262
)}
6363
{content === 'button' && <ButtonPage />}
6464
{content === 'tabs' && <p>This element is not ready</p>}
@@ -67,19 +67,7 @@ function App() {
6767
{content === 'input' && <InputPage />}
6868
{content === 'numberInput' && <NumberInputPage />}
6969
{content === 'list' && <ListPage />}
70-
</div>
71-
</div>
72-
<div className="zep-grid__row--cards">
73-
<div
74-
className="zep-grid__col--cards zep-grid__col--cards-2-3"
75-
style={{ paddingTop: 45 }}
76-
>
77-
{content === 'welcome' && (
78-
<p>Welcome to the Zeppelin Element Library</p>
79-
)}
80-
{content === 'button' && <ButtonPage />}
81-
{content === 'tabs' && <p>This element is not ready</p>}
82-
{content === 'tag' && <TagPage />}
70+
{content === 'radio' && <RadioPage />}
8371
</div>
8472
</div>
8573
</div>

src/base_bundle_entry.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ $include-typography: true !default;
3131
@import './elements/checkbox/checkbox';
3232
@import './elements/input/input';
3333
@import './elements/list/list';
34+
@import './elements/radio/radio';

src/elements/button/__tests__/Button.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import ButtonPage from '../ButtonPage.jsx';
3+
import ButtonPage from '../ButtonPage';
44
import Button from '../button';
55

66
it('renders without crashing', () => {

src/elements/checkbox/_checkbox.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
font-size: 1.125rem;
6565
text-align: center;
6666
transform: scale(1);
67-
6867
color: themed('primary');
6968
}
7069
&:checked:focus + .#{$prefix}checkbox__label:before {

src/elements/elements.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ module.exports = {
2323
isReady: true
2424
},
2525
list: {
26-
name: 'List',
26+
name: 'list',
27+
isReady: true
28+
},
29+
radio: {
30+
name: 'radio',
2731
isReady: true
2832
}
2933
};

src/elements/input/__tests__/InputPage.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import InputPage from '../InputPage.jsx';
3+
import InputPage from '../InputPage';
44

55
it('renders without crashing', () => {
66
const div = document.createElement('div');

src/elements/list/__tests__/ListPage.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import ListPage from '../ListPage.jsx';
3+
import ListPage from '../ListPage';
44

55
it('renders without crashing', () => {
66
const div = document.createElement('div');

0 commit comments

Comments
 (0)