-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alyssa
committed
May 2, 2019
1 parent
9c87ec4
commit 2bcc566
Showing
16 changed files
with
659 additions
and
609 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,3 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"airbnb-base", | ||
"plugin:prettier/recommended", | ||
"plugin:react/recommended", | ||
"plugin:jest/recommended" | ||
], | ||
"rules": { | ||
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }] | ||
}, | ||
"env": { | ||
"es6": true, | ||
"browser": true, | ||
"node": true | ||
}, | ||
"settings": { | ||
"react": { | ||
"createClass": "createReactClass", | ||
"pragma": "React", | ||
"version": "detect" | ||
}, | ||
"propWrapperFunctions": [ | ||
"forbidExtraProps", | ||
{ "property": "freeze", "object": "Object" }, | ||
{ "property": "myFavoriteWrapper" } | ||
], | ||
"linkComponents": ["Hyperlink", { "name": "Link", "linkAttribute": "to" }] | ||
} | ||
"extends": ["react-app"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"cSpell.words": [ | ||
"themify" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
|
||
function RadioPage() { | ||
return ( | ||
<> | ||
<span className="theme-zeppelin"> | ||
<label className="zep-radio" style={{ marginBottom: 15 }}> | ||
<input type="radio" name="radio" className="zep-radio__input" /> | ||
<span className="zep-radio__indicator" /> | ||
<span className="zep-radio__label">Radio Zeppelin</span> | ||
</label> | ||
</span> | ||
<span className="theme-cat"> | ||
<label className="zep-radio" style={{ marginBottom: 15 }}> | ||
Radio Cat | ||
<input type="radio" name="radio" className="zep-radio__input" /> | ||
<span className="zep-radio__indicator" /> | ||
</label> | ||
</span> | ||
<span className="theme-rental"> | ||
<label className="zep-radio" style={{ marginBottom: 15 }}> | ||
Radio Rental | ||
<input type="radio" name="radio" className="zep-radio__input" /> | ||
<span className="zep-radio__indicator" /> | ||
</label> | ||
</span> | ||
</> | ||
); | ||
} | ||
|
||
export default RadioPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import RadioPage from '../RadioPage'; | ||
|
||
it('renders without crashing', () => { | ||
const div = document.createElement('div'); | ||
ReactDOM.render(<RadioPage />, div); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
//Radio - base style | ||
|
||
@mixin radio { | ||
.#{$prefix}radio { | ||
@extend %typo-normal-3; | ||
display: block; | ||
position: relative; | ||
padding-left: 34px; | ||
min-height: 1.5; | ||
cursor: pointer; | ||
user-select: none; | ||
color: map-get($colormap-base, grey-dark); | ||
} | ||
|
||
.#{$prefix}radio .#{$prefix}radio__input { | ||
position: absolute; | ||
opacity: 0; | ||
cursor: pointer; | ||
} | ||
|
||
.#{$prefix}radio__indicator { | ||
position: absolute; | ||
top: 1px; | ||
left: 0; | ||
height: 22px; | ||
width: 22px; | ||
background-color: map-get($colormap-base, white); | ||
border: 2px solid map-get($colormap-base, gray-dark); | ||
border-radius: 50%; | ||
} | ||
|
||
.#{$prefix}radio:hover .#{$prefix}radio__input ~ .#{$prefix}radio__indicator { | ||
@include themify($themes) { | ||
box-shadow: 0 0 5px 1px themed('primary'); | ||
} | ||
} | ||
|
||
.#{$prefix}radio__indicator:after { | ||
content: ''; | ||
position: absolute; | ||
display: none; | ||
} | ||
|
||
.#{$prefix}radio | ||
.#{$prefix}radio__input:checked | ||
~ .#{$prefix}radio__indicator:after { | ||
display: block; | ||
} | ||
|
||
.#{$prefix}radio .#{$prefix}radio__indicator:after { | ||
top: 4px; | ||
left: 4.1px; | ||
width: 10px; | ||
height: 10px; | ||
border-radius: 50%; | ||
@include themify($themes) { | ||
background: themed('primary'); | ||
} | ||
} | ||
} | ||
|
||
@include exports('radio') { | ||
@include radio; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import '@babel/polyfill'; | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './App'; | ||
|
Oops, something went wrong.