Skip to content

Commit

Permalink
fix warning and remove unused icon
Browse files Browse the repository at this point in the history
  • Loading branch information
hungvu193 committed Aug 11, 2023
1 parent 789aec2 commit 5ea39f2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 43 deletions.
23 changes: 0 additions & 23 deletions assets/images/lounge-access.svg

This file was deleted.

8 changes: 4 additions & 4 deletions src/components/Icon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class Icon extends PureComponent {
width={width}
height={height}
fill={this.props.fill}
isHovered={this.props.isHovered}
isPressed={this.props.isPressed}
hovered={this.props.isHovered.toString()}
pressed={this.props.isPressed.toString()}
/>
</View>
</View>
Expand All @@ -83,8 +83,8 @@ class Icon extends PureComponent {
width={width}
height={height}
fill={this.props.fill}
isHovered={this.props.isHovered}
isPressed={this.props.isPressed}
hovered={this.props.isHovered.toString()}
pressed={this.props.isPressed.toString()}
/>
</View>
);
Expand Down
19 changes: 5 additions & 14 deletions src/components/Icon/svgs/LoungeAccessIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,22 @@ 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';
import variables from '../../../styles/variables';

const propTypes = {
/** The width of the icon. */
width: PropTypes.number,

/** The height of the icon. */
height: PropTypes.number,

/** 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 */
isHovered: PropTypes.bool,
hovered: PropTypes.string,

/** Is icon pressed */
isPressed: PropTypes.bool,
pressed: PropTypes.string,
};

const defaultProps = {
width: variables.iconSizeNormal,
height: variables.iconSizeNormal,
fill: themeColors.icon,
isHovered: false,
isPressed: false,
hovered: 'false',
pressed: 'false',
};

function LoungeAccessIcon(props) {
Expand All @@ -53,7 +44,7 @@ function LoungeAccessIcon(props) {
</G>
<G>
<Path
fill={props.isHovered || props.isPressed ? props.fill : themeColors.starDefaultBG}
fill={props.hovered === 'true' || props.pressed === 'true' ? props.fill : themeColors.starDefaultBG}
className="st1"
d="M31,9.8c-0.1-0.2-0.2-0.4-0.5-0.4h-2.1l-0.8-2C27.4,7,27.1,7,27,7c-0.1,0-0.4,0-0.6,0.4l-0.8,1.9h-2.1 c-0.4,0-0.5,0.4-0.5,0.4c0,0.1-0.1,0.4,0.1,0.6l1.6,1.8l-0.6,1.9c-0.1,0.3,0.1,0.5,0.2,0.7c0.1,0,0.3,0.2,0.7,0.1l2-1.1l2,1.2 c0.3,0.2,0.6,0,0.7-0.1c0.1-0.1,0.3-0.3,0.2-0.7l-0.6-2l1.5-1.7C31,10.3,31,10,31,9.8z"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ const MenuItem = React.forwardRef((props, ref) => {
<View style={[styles.popoverMenuIcon, ...props.iconStyles, StyleUtils.getAvatarWidthStyle(props.avatarSize)]}>
{props.iconType === CONST.ICON_TYPE_ICON && (
<Icon
isHovered={isHovered}
isPressed={pressed}
hovered={isHovered}
pressed={pressed}
src={props.icon}
width={props.iconWidth}
height={props.iconHeight}
Expand Down

0 comments on commit 5ea39f2

Please sign in to comment.