Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(swap): price impact icon #3084

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions apps/wallet-mobile/src/components/Icon/Warning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,13 @@ type Props = {
}

export const Warning = ({size = 36, color = 'black'}: Props) => (
<Svg width={size} height={size} viewBox="-2 -2 28 28" fill="none">
<Path
d="M10 6C10.5523 6 11 6.44772 11 7V11C11 11.5523 10.5523 12 10 12C9.44771 12 9 11.5523 9 11V7C9 6.44772 9.44771 6 10 6Z"
fill={color}
/>

<Path
d="M10 13C9.44771 13 9 13.4477 9 14C9 14.5523 9.44771 15 10 15H10.01C10.5623 15 11.01 14.5523 11.01 14C11.01 13.4477 10.5623 13 10.01 13H10Z"
fill={color}
/>
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
<Path d="M12 8a1 1 0 011 1v4a1 1 0 11-2 0V9a1 1 0 011-1zM12 15a1 1 0 100 2h.01a1 1 0 100-2H12z" fill={color} />

<Path
fill-rule="evenodd"
clip-rule="evenodd"
d="M8.57283 0.403518C9.00267 0.140677 9.49531 0 10 0C10.5047 0 10.9974 0.140677 11.4272 0.403518C11.8561 0.665766 12.2052 1.03883 12.4438 1.47999L12.4447 1.48165L19.6352 14.6868L19.6363 14.6888C19.8756 15.1245 19.9999 15.615 20 16.1118C20.0001 16.6093 19.8756 17.1007 19.6359 17.537C19.396 17.9735 19.0475 18.3422 18.6208 18.6012C18.1936 18.8605 17.7049 18.9994 17.2044 18.9999H2.81903C2.31781 19.0037 1.82733 18.8686 1.39752 18.6123C0.966669 18.3553 0.61416 17.987 0.370962 17.5494C0.127911 17.1122 0.0010617 16.6188 6.63588e-06 16.1189C-0.00104664 15.6197 0.123298 15.1267 0.36366 14.6889L0.364873 14.6867L7.55538 1.48165L7.55627 1.47999C7.79489 1.03883 8.14396 0.665766 8.57283 0.403518ZM10 2C9.86843 2 9.73614 2.03645 9.61619 2.1098C9.49582 2.18341 9.39025 2.29295 9.31516 2.43201L9.31351 2.43505L2.11714 15.6509C2.04118 15.7889 1.99965 15.9491 2 16.1146C2.00035 16.2802 2.04255 16.4401 2.11904 16.5777C2.19539 16.7151 2.30158 16.8228 2.42207 16.8946C2.54213 16.9662 2.67416 17.0012 2.80531 17L2.81475 16.9999L17.2022 16.9999C17.3327 16.9998 17.4639 16.9638 17.5831 16.8915C17.7026 16.8189 17.8077 16.711 17.8831 16.5738C17.9586 16.4363 18 16.277 18 16.1123C18 15.9475 17.9585 15.7882 17.8829 15.6508L17.8808 15.647L10.6865 2.43505L10.6849 2.43201C10.6098 2.29295 10.5042 2.18341 10.3838 2.1098C10.2639 2.03645 10.1316 2 10 2Z"
fillRule="evenodd"
clipRule="evenodd"
d="M10.573 2.404C11.003 2.14 11.495 2 12 2s.997.14 1.427.404c.43.262.778.635 1.017 1.076v.002l7.191 13.205.001.002a2.959 2.959 0 010 2.848c-.24.437-.588.805-1.015 1.064-.427.26-.916.398-1.417.399H4.82a2.733 2.733 0 01-1.421-.388A2.844 2.844 0 012.37 19.55a2.959 2.959 0 01-.007-2.86v-.002L9.556 3.482l.001-.002a2.847 2.847 0 011.017-1.076zM12 4a.734.734 0 00-.384.11.847.847 0 00-.3.322l-.003.003-7.196 13.216a.96.96 0 00.002.927.843.843 0 00.303.317c.12.071.252.106.383.105h14.397c.13 0 .262-.036.381-.108a.847.847 0 00.3-.318.96.96 0 000-.923l-.002-.004-7.194-13.212-.002-.003a.847.847 0 00-.301-.322A.734.734 0 0012 4z"
fill={color}
/>
</Svg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ export const ShowPriceImpact = ({priceImpact, formattedPrice, pair}: PriceImpact
<View style={styles.row}>
{priceImpactRisk === 'moderate' && <Icon.Info size={20} color={textColor} />}

{priceImpactRisk === 'high' && (
<View style={{paddingTop: 2}}>
<Icon.Warning size={20} color={textColor} />
</View>
)}
{priceImpactRisk === 'high' && <Icon.Warning size={20} color={textColor} />}

<Text style={[{color: textColor}, styles.textContent]}>
<Text>{strings.priceImpact}</Text>
Expand Down
Loading