diff --git a/ui/components/ui/icon/icon-eye-slash.js b/ui/components/ui/icon/icon-eye-slash.js new file mode 100644 index 000000000..a509dcabd --- /dev/null +++ b/ui/components/ui/icon/icon-eye-slash.js @@ -0,0 +1,43 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const IconEyeSlash = ({ + size = 24, + color = 'currentColor', + ariaLabel, + className, +}) => ( + // This SVG is copied from `@fortawesome/fontawesome-free@5.13.0/regular/eye-slash.svg`. + + + +); + +IconEyeSlash.propTypes = { + /** + * The size of the Icon follows an 8px grid 2 = 16px, 3 = 24px etc + */ + size: PropTypes.number, + /** + * The color of the icon accepts design token css variables + */ + color: PropTypes.string, + /** + * An additional className to assign the Icon + */ + className: PropTypes.string, + /** + * The aria-label of the icon for accessibility purposes + */ + ariaLabel: PropTypes.string, +}; + +export default IconEyeSlash; diff --git a/ui/components/ui/icon/icon-eye.js b/ui/components/ui/icon/icon-eye.js new file mode 100644 index 000000000..60a51a55c --- /dev/null +++ b/ui/components/ui/icon/icon-eye.js @@ -0,0 +1,43 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const IconEye = ({ + size = 24, + color = 'currentColor', + ariaLabel, + className, +}) => ( + // This SVG copied from `@fortawesome/fontawesome-free@5.13.0/regular/eye.svg`. + + + +); + +IconEye.propTypes = { + /** + * The size of the Icon follows an 8px grid 2 = 16px, 3 = 24px etc + */ + size: PropTypes.number, + /** + * The color of the icon accepts design token css variables + */ + color: PropTypes.string, + /** + * An additional className to assign the Icon + */ + className: PropTypes.string, + /** + * The aria-label of the icon for accessibility purposes + */ + ariaLabel: PropTypes.string, +}; + +export default IconEye; diff --git a/ui/components/ui/icon/icon.stories.js b/ui/components/ui/icon/icon.stories.js index 4aaa79e70..d62465381 100644 --- a/ui/components/ui/icon/icon.stories.js +++ b/ui/components/ui/icon/icon.stories.js @@ -36,6 +36,8 @@ import IconConnect from './icon-connect'; import IconImport from './icon-import'; import IconSpeechBubbles from './icon-speech-bubbles'; import IconPlus from './icon-plus'; +import IconEye from './icon-eye'; +import IconEyeSlash from './icon-eye-slash'; const validColors = [ 'var(--color-icon-default)', @@ -153,6 +155,8 @@ export const DefaultStory = (args) => ( } /> } /> } /> + } /> + } />