-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to the gas selection button group as requested here: #1390 (comment)
- Loading branch information
1 parent
8be1989
commit b2cabde
Showing
32 changed files
with
226 additions
and
378 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
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,36 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Radio should render correctly 1`] = ` | ||
<Svg | ||
height="12" | ||
preserveAspectRatio="xMidYMid meet" | ||
viewBox="0 0 12 12" | ||
width="12" | ||
> | ||
<Circle | ||
cx="6" | ||
cy="6" | ||
fill="none" | ||
r="5.5" | ||
stroke="#D2D8DD" | ||
/> | ||
</Svg> | ||
`; | ||
|
||
exports[`Radio should render correctly when selected 1`] = ` | ||
<Svg | ||
height="12" | ||
preserveAspectRatio="xMidYMid meet" | ||
viewBox="0 0 12 12" | ||
width="12" | ||
> | ||
<Circle | ||
cx="6" | ||
cy="6" | ||
fill="none" | ||
r="4" | ||
stroke="#037dd6" | ||
strokeWidth="4" | ||
/> | ||
</Svg> | ||
`; |
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,20 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Svg, { Circle } from 'react-native-svg'; | ||
import { colors } from '../../../../app/styles/common'; | ||
|
||
const Radio = ({ selected }) => ( | ||
<Svg width="12" height="12" viewBox="0 0 12 12"> | ||
{selected ? ( | ||
<Circle cx="6" cy="6" r="4" stroke={colors.blue} strokeWidth="4" fill="none" /> | ||
) : ( | ||
<Circle cx="6" cy="6" r="5.5" stroke="#D2D8DD" fill="none" /> | ||
)} | ||
</Svg> | ||
); | ||
|
||
Radio.propTypes = { | ||
selected: PropTypes.bool | ||
}; | ||
|
||
export default 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import Radio from './'; | ||
|
||
describe('Radio', () => { | ||
it('should render correctly', () => { | ||
const wrapper = shallow(<Radio />); | ||
expect(wrapper).toMatchSnapshot(); | ||
}); | ||
it('should render correctly when selected', () => { | ||
const wrapper = shallow(<Radio selected />); | ||
expect(wrapper).toMatchSnapshot(); | ||
}); | ||
}); |
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
Oops, something went wrong.