diff --git a/ui/app/components/ui/button/button.component.js b/ui/app/components/ui/button/button.component.js index a059a7f00..621d3cecc 100644 --- a/ui/app/components/ui/button/button.component.js +++ b/ui/app/components/ui/button/button.component.js @@ -44,11 +44,7 @@ Button.propTypes = { submit: PropTypes.bool, large: PropTypes.bool, className: PropTypes.string, - children: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.array, - PropTypes.element, - ]), + children: PropTypes.node, } Button.defaultProps = { diff --git a/ui/app/components/ui/icon/approve-icon.component.js b/ui/app/components/ui/icon/approve-icon.component.js new file mode 100644 index 000000000..38135a3cb --- /dev/null +++ b/ui/app/components/ui/icon/approve-icon.component.js @@ -0,0 +1,40 @@ +import React from 'react' +import PropTypes from 'prop-types' + +const Approve = ({ + className, + size, + color, +}) => ( + + + + +) + +Approve.defaultProps = { + className: undefined, +} + +Approve.propTypes = { + className: PropTypes.string, + size: PropTypes.number.isRequired, + color: PropTypes.string.isRequired, +} + +export default Approve diff --git a/ui/app/components/ui/icon/copy-icon.component.js b/ui/app/components/ui/icon/copy-icon.component.js new file mode 100644 index 000000000..04175213d --- /dev/null +++ b/ui/app/components/ui/icon/copy-icon.component.js @@ -0,0 +1,36 @@ +import React from 'react' +import PropTypes from 'prop-types' + +const Copy = ({ + className, + size, + color, +}) => ( + + + +) + +Copy.defaultProps = { + className: undefined, +} + +Copy.propTypes = { + className: PropTypes.string, + size: PropTypes.number.isRequired, + color: PropTypes.string.isRequired, +} + +export default Copy diff --git a/ui/app/components/ui/icon/icon.stories.js b/ui/app/components/ui/icon/icon.stories.js new file mode 100644 index 000000000..73d25e6fd --- /dev/null +++ b/ui/app/components/ui/icon/icon.stories.js @@ -0,0 +1,53 @@ +import React from 'react' +import Approve from './approve-icon.component' +import Copy from './copy-icon.component' +import Interaction from './interaction-icon.component' +import Preloader from './preloader' +import Receive from './receive-icon.component' +import Send from './send-icon.component' +import { color, number } from '@storybook/addon-knobs/react' + +export default { + title: 'Icon', +} + +export const copy = () => ( + +) + +export const send = () => ( + +) + +export const receive = () => ( + +) + +export const siteInteraction = () => ( + +) + +export const approveSpendLimit = () => ( + +) + +export const preloader = () => ( + +) diff --git a/ui/app/components/ui/icon/interaction-icon.component.js b/ui/app/components/ui/icon/interaction-icon.component.js new file mode 100644 index 000000000..799f7e19d --- /dev/null +++ b/ui/app/components/ui/icon/interaction-icon.component.js @@ -0,0 +1,40 @@ +import React from 'react' +import PropTypes from 'prop-types' + +const Interaction = ({ + className, + size, + color, +}) => ( + + + + +) + +Interaction.defaultProps = { + className: undefined, +} + +Interaction.propTypes = { + className: PropTypes.string, + size: PropTypes.number.isRequired, + color: PropTypes.string.isRequired, +} + +export default Interaction diff --git a/ui/app/components/ui/icon/preloader/index.js b/ui/app/components/ui/icon/preloader/index.js new file mode 100644 index 000000000..b8c7793d6 --- /dev/null +++ b/ui/app/components/ui/icon/preloader/index.js @@ -0,0 +1,3 @@ +import preloader from './preloader-icon.component' + +export default preloader diff --git a/ui/app/components/ui/icon/preloader/index.scss b/ui/app/components/ui/icon/preloader/index.scss new file mode 100644 index 000000000..2a62c950d --- /dev/null +++ b/ui/app/components/ui/icon/preloader/index.scss @@ -0,0 +1,15 @@ +.preloader__icon { + animation-name: spin; + animation-duration: 500ms; + animation-iteration-count: infinite; + animation-timing-function: linear; +} + +@keyframes spin { + from { + transform:rotate(0deg); + } + to { + transform:rotate(360deg); + } +} diff --git a/ui/app/components/ui/icon/preloader/preloader-icon.component.js b/ui/app/components/ui/icon/preloader/preloader-icon.component.js new file mode 100644 index 000000000..e67d0901d --- /dev/null +++ b/ui/app/components/ui/icon/preloader/preloader-icon.component.js @@ -0,0 +1,57 @@ +import React from 'react' +import PropTypes from 'prop-types' +import classnames from 'classnames' + +const Preloader = ({ + className, + size, +}) => ( + + + + + + + + + +) + +Preloader.defaultProps = { + className: undefined, +} + +Preloader.propTypes = { + className: PropTypes.string, + size: PropTypes.number.isRequired, +} + +export default Preloader diff --git a/ui/app/components/ui/icon/receive-icon.component.js b/ui/app/components/ui/icon/receive-icon.component.js new file mode 100644 index 000000000..3ff9e3047 --- /dev/null +++ b/ui/app/components/ui/icon/receive-icon.component.js @@ -0,0 +1,50 @@ +import React from 'react' +import PropTypes from 'prop-types' + +const Receive = ({ + className, + size, + color, +}) => ( + + + + + +) + +Receive.defaultProps = { + className: undefined, +} + +Receive.propTypes = { + className: PropTypes.string, + size: PropTypes.number.isRequired, + color: PropTypes.string.isRequired, +} + +export default Receive diff --git a/ui/app/components/ui/icon/send-icon.component.js b/ui/app/components/ui/icon/send-icon.component.js new file mode 100644 index 000000000..eae7ace25 --- /dev/null +++ b/ui/app/components/ui/icon/send-icon.component.js @@ -0,0 +1,42 @@ +import React from 'react' +import PropTypes from 'prop-types' + +const Send = ({ + className, + size, + color, +}) => ( + + + + +) + +Send.defaultProps = { + className: undefined, +} + +Send.propTypes = { + className: PropTypes.string, + size: PropTypes.number.isRequired, + color: PropTypes.string.isRequired, +} + +export default Send diff --git a/ui/app/css/itcss/components/index.scss b/ui/app/css/itcss/components/index.scss index c8cf1d903..1153ea47d 100644 --- a/ui/app/css/itcss/components/index.scss +++ b/ui/app/css/itcss/components/index.scss @@ -1,6 +1,7 @@ @import '../../../components/ui/button/buttons'; @import '../../../components/ui/dialog/dialog'; @import '../../../components/ui/snackbar/index'; +@import '../../../components/ui/icon/preloader/index'; @import './footer.scss'; diff --git a/ui/app/css/itcss/settings/variables.scss b/ui/app/css/itcss/settings/variables.scss index 7302a648d..aa28cf2fe 100644 --- a/ui/app/css/itcss/settings/variables.scss +++ b/ui/app/css/itcss/settings/variables.scss @@ -267,4 +267,4 @@ $xxlarge-spacing: 64px; %content-text { @extend %font; font-size: 14px; -} \ No newline at end of file +}