diff --git a/assets/images/lounge-access.svg b/assets/images/lounge-access.svg deleted file mode 100644 index 3be9ff00fb7a..000000000000 --- a/assets/images/lounge-access.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/components/Icon/Expensicons.js b/src/components/Icon/Expensicons.js index 2f04c0199587..9e49a69eb0d1 100644 --- a/src/components/Icon/Expensicons.js +++ b/src/components/Icon/Expensicons.js @@ -64,7 +64,7 @@ import Link from '../../../assets/images/link.svg'; import LinkCopy from '../../../assets/images/link-copy.svg'; import Location from '../../../assets/images/location.svg'; import Lock from '../../../assets/images/lock.svg'; -import LoungeAccess from '../../../assets/images/lounge-access.svg'; +import LoungeAccess from './svgs/LoungeAccessIcon'; import Luggage from '../../../assets/images/luggage.svg'; import MagnifyingGlass from '../../../assets/images/magnifying-glass.svg'; import Mail from '../../../assets/images/mail.svg'; diff --git a/src/components/Icon/index.js b/src/components/Icon/index.js index 8c6559451215..5cdd5c79704d 100644 --- a/src/components/Icon/index.js +++ b/src/components/Icon/index.js @@ -1,9 +1,9 @@ import React, {PureComponent} from 'react'; import {View} from 'react-native'; import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; import themeColors from '../../styles/themes/default'; import variables from '../../styles/variables'; +import styles from '../../styles/styles'; import * as StyleUtils from '../../styles/StyleUtils'; import IconWrapperStyles from './IconWrapperStyles'; @@ -26,6 +26,12 @@ const propTypes = { /** Is inline icon */ inline: PropTypes.bool, + /** Is icon hovered */ + hovered: PropTypes.bool, + + /** Is icon pressed */ + pressed: PropTypes.bool, + // eslint-disable-next-line react/forbid-prop-types additionalStyles: PropTypes.arrayOf(PropTypes.object), }; @@ -37,6 +43,8 @@ const defaultProps = { small: false, inline: false, additionalStyles: [], + hovered: false, + pressed: false, }; // We must use a class component to create an animatable component with the Animated API @@ -58,6 +66,8 @@ class Icon extends PureComponent { width={width} height={height} fill={this.props.fill} + hovered={this.props.hovered.toString()} + pressed={this.props.pressed.toString()} /> @@ -73,6 +83,8 @@ class Icon extends PureComponent { width={width} height={height} fill={this.props.fill} + hovered={this.props.hovered.toString()} + pressed={this.props.pressed.toString()} /> ); diff --git a/src/components/Icon/svgs/LoungeAccessIcon.js b/src/components/Icon/svgs/LoungeAccessIcon.js new file mode 100644 index 000000000000..b00fbb312c85 --- /dev/null +++ b/src/components/Icon/svgs/LoungeAccessIcon.js @@ -0,0 +1,70 @@ +import * as React from 'react'; +import Svg, {G, Path, Polygon} from 'react-native-svg'; +import PropTypes from 'prop-types'; +import themeColors from '../../../styles/themes/default'; + +const propTypes = { + /** The fill color for the icon. Can be hex, rgb, rgba, or valid react-native named color such as 'red' or 'blue'. */ + fill: PropTypes.string, + + /** Is icon hovered */ + hovered: PropTypes.string, + + /** Is icon pressed */ + pressed: PropTypes.string, +}; + +const defaultProps = { + fill: themeColors.icon, + hovered: 'false', + pressed: 'false', +}; + +function LoungeAccessIcon(props) { + return ( + + + + + + + + + + + + + ); +} + +LoungeAccessIcon.displayName = 'LoungeAccessIcon'; +LoungeAccessIcon.propTypes = propTypes; +LoungeAccessIcon.defaultProps = defaultProps; + +export default LoungeAccessIcon; diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index 3bac0eba0bc4..4d930d85cddb 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -163,6 +163,8 @@ const MenuItem = React.forwardRef((props, ref) => { {props.iconType === CONST.ICON_TYPE_ICON && (