-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #683 from appnexus/678-beaker-icon
Add Beaker Icon
- Loading branch information
Showing
7 changed files
with
122 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import _ from 'lodash'; | ||
import React from 'react'; | ||
import Icon from '../Icon'; | ||
import { lucidClassNames } from '../../../util/style-helpers'; | ||
import { createClass } from '../../../util/component-types'; | ||
|
||
const cx = lucidClassNames.bind('&-BeakerIcon'); | ||
|
||
/** | ||
* | ||
* {"categories": ["visual design", "icons"], "extend": "Icon", "madeFrom": ["Icon"]} | ||
* | ||
* A Beaker icon. | ||
*/ | ||
const BeakerIcon = createClass({ | ||
displayName: 'BeakerIcon', | ||
propTypes: { | ||
...Icon.propTypes, | ||
}, | ||
|
||
render() { | ||
const { | ||
className, | ||
...passThroughs | ||
} = this.props; | ||
|
||
return ( | ||
<Icon | ||
{...passThroughs} | ||
{..._.pick(passThroughs, _.keys(Icon.propTypes))} | ||
className={cx('&', className)} | ||
> | ||
<path opacity='0.4' d='M4.034,11.33C4.015,11.383,4,11.439,4,11.5C4,11.775,4.224,12,4.5,12h7c0.276,0,0.5-0.225,0.5-0.5 c0-0.061-0.015-0.117-0.034-0.17l-0.14-0.203L10.369,9H5.63l-1.457,2.127L4.034,11.33z'/> | ||
<path d='M12.748,10.67l-0.013-0.02L10,6.715V3h0.301c0.276,0,0.5-0.224,0.5-0.5S10.577,2,10.301,2H5.7C5.424,2,5.2,2.224,5.2,2.5 S5.424,3,5.7,3H6v3.715L3.265,10.65l-0.013,0.02C3.093,10.908,3,11.193,3,11.5c0,0.336,0.114,0.643,0.301,0.893 C3.575,12.76,4.008,13,4.5,13h7c0.492,0,0.925-0.24,1.199-0.607C12.886,12.143,13,11.836,13,11.5 C13,11.193,12.907,10.908,12.748,10.67z M7,7V3h2v4l1.369,2l1.457,2.127l0.14,0.203C11.985,11.383,12,11.439,12,11.5 c0,0.275-0.224,0.5-0.5,0.5h-7C4.224,12,4,11.775,4,11.5c0-0.061,0.015-0.117,0.034-0.17l0.14-0.203L5.63,9L7,7z'/> | ||
</Icon> | ||
); | ||
}, | ||
}); | ||
|
||
export default BeakerIcon; |
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 { icons, common } from '../../../util/generic-tests'; | ||
|
||
import BeakerIcon from './BeakerIcon'; | ||
|
||
describe('BeakerIcon', () => { | ||
common(BeakerIcon); | ||
icons(BeakerIcon); | ||
}); |
48 changes: 48 additions & 0 deletions
48
src/components/Icon/BeakerIcon/__snapshots__/BeakerIcon.spec.jsx.snap
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,48 @@ | ||
exports[`BeakerIcon [common] example testing should match snapshot(s) for 1.default 1`] = ` | ||
<Icon | ||
aspectRatio="xMidYMid meet" | ||
className="lucid-BeakerIcon" | ||
isBadge={false} | ||
isDisabled={false} | ||
size={16} | ||
viewBox="0 0 16 16"> | ||
<path | ||
d="M4.034,11.33C4.015,11.383,4,11.439,4,11.5C4,11.775,4.224,12,4.5,12h7c0.276,0,0.5-0.225,0.5-0.5 c0-0.061-0.015-0.117-0.034-0.17l-0.14-0.203L10.369,9H5.63l-1.457,2.127L4.034,11.33z" | ||
opacity="0.4" /> | ||
<path | ||
d="M12.748,10.67l-0.013-0.02L10,6.715V3h0.301c0.276,0,0.5-0.224,0.5-0.5S10.577,2,10.301,2H5.7C5.424,2,5.2,2.224,5.2,2.5 S5.424,3,5.7,3H6v3.715L3.265,10.65l-0.013,0.02C3.093,10.908,3,11.193,3,11.5c0,0.336,0.114,0.643,0.301,0.893 C3.575,12.76,4.008,13,4.5,13h7c0.492,0,0.925-0.24,1.199-0.607C12.886,12.143,13,11.836,13,11.5 C13,11.193,12.907,10.908,12.748,10.67z M7,7V3h2v4l1.369,2l1.457,2.127l0.14,0.203C11.985,11.383,12,11.439,12,11.5 c0,0.275-0.224,0.5-0.5,0.5h-7C4.224,12,4,11.775,4,11.5c0-0.061,0.015-0.117,0.034-0.17l0.14-0.203L5.63,9L7,7z" /> | ||
</Icon> | ||
`; | ||
|
||
exports[`BeakerIcon [common] example testing should match snapshot(s) for 2.clickable 1`] = ` | ||
<Icon | ||
aspectRatio="xMidYMid meet" | ||
className="lucid-BeakerIcon" | ||
isBadge={false} | ||
isClickable={true} | ||
isDisabled={false} | ||
size={16} | ||
viewBox="0 0 16 16"> | ||
<path | ||
d="M4.034,11.33C4.015,11.383,4,11.439,4,11.5C4,11.775,4.224,12,4.5,12h7c0.276,0,0.5-0.225,0.5-0.5 c0-0.061-0.015-0.117-0.034-0.17l-0.14-0.203L10.369,9H5.63l-1.457,2.127L4.034,11.33z" | ||
opacity="0.4" /> | ||
<path | ||
d="M12.748,10.67l-0.013-0.02L10,6.715V3h0.301c0.276,0,0.5-0.224,0.5-0.5S10.577,2,10.301,2H5.7C5.424,2,5.2,2.224,5.2,2.5 S5.424,3,5.7,3H6v3.715L3.265,10.65l-0.013,0.02C3.093,10.908,3,11.193,3,11.5c0,0.336,0.114,0.643,0.301,0.893 C3.575,12.76,4.008,13,4.5,13h7c0.492,0,0.925-0.24,1.199-0.607C12.886,12.143,13,11.836,13,11.5 C13,11.193,12.907,10.908,12.748,10.67z M7,7V3h2v4l1.369,2l1.457,2.127l0.14,0.203C11.985,11.383,12,11.439,12,11.5 c0,0.275-0.224,0.5-0.5,0.5h-7C4.224,12,4,11.775,4,11.5c0-0.061,0.015-0.117,0.034-0.17l0.14-0.203L5.63,9L7,7z" /> | ||
</Icon> | ||
`; | ||
|
||
exports[`BeakerIcon [common] example testing should match snapshot(s) for 3.disabled 1`] = ` | ||
<Icon | ||
aspectRatio="xMidYMid meet" | ||
className="lucid-BeakerIcon" | ||
isBadge={false} | ||
isDisabled={true} | ||
size={16} | ||
viewBox="0 0 16 16"> | ||
<path | ||
d="M4.034,11.33C4.015,11.383,4,11.439,4,11.5C4,11.775,4.224,12,4.5,12h7c0.276,0,0.5-0.225,0.5-0.5 c0-0.061-0.015-0.117-0.034-0.17l-0.14-0.203L10.369,9H5.63l-1.457,2.127L4.034,11.33z" | ||
opacity="0.4" /> | ||
<path | ||
d="M12.748,10.67l-0.013-0.02L10,6.715V3h0.301c0.276,0,0.5-0.224,0.5-0.5S10.577,2,10.301,2H5.7C5.424,2,5.2,2.224,5.2,2.5 S5.424,3,5.7,3H6v3.715L3.265,10.65l-0.013,0.02C3.093,10.908,3,11.193,3,11.5c0,0.336,0.114,0.643,0.301,0.893 C3.575,12.76,4.008,13,4.5,13h7c0.492,0,0.925-0.24,1.199-0.607C12.886,12.143,13,11.836,13,11.5 C13,11.193,12.907,10.908,12.748,10.67z M7,7V3h2v4l1.369,2l1.457,2.127l0.14,0.203C11.985,11.383,12,11.439,12,11.5 c0,0.275-0.224,0.5-0.5,0.5h-7C4.224,12,4,11.775,4,11.5c0-0.061,0.015-0.117,0.034-0.17l0.14-0.203L5.63,9L7,7z" /> | ||
</Icon> | ||
`; |
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 { BeakerIcon } from '../../../../index'; | ||
|
||
export default React.createClass({ | ||
render() { | ||
return <BeakerIcon />; | ||
}, | ||
}); |
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 { BeakerIcon } from '../../../../index'; | ||
|
||
export default React.createClass({ | ||
render() { | ||
return <BeakerIcon isClickable />; | ||
}, | ||
}); |
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 { BeakerIcon } from '../../../../index'; | ||
|
||
export default React.createClass({ | ||
render() { | ||
return <BeakerIcon isDisabled />; | ||
}, | ||
}); |
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