Skip to content

Commit

Permalink
Merge pull request LedgerHQ#147 from LedgerHQ/fixmyeyes
Browse files Browse the repository at this point in the history
Changes to the eyes icons in discreet mode
  • Loading branch information
gre authored Jan 24, 2020
2 parents 7718938 + 07ddea1 commit 5738f39
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
17 changes: 7 additions & 10 deletions src/renderer/icons/Eye.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@

import React from "react";

const path = (
<path
fill="currentColor"
d="M2.502 8.393c.335.494.731.99 1.184 1.45C4.953 11.128 6.399 11.888 8 11.888s3.047-.76 4.314-2.047A10.368 10.368 0 0 0 13.751 8a10.368 10.368 0 0 0-1.437-1.842C11.047 4.87 9.601 4.11 8 4.11s-3.047.76-4.314 2.047A10.368 10.368 0 0 0 2.249 8c.073.12.158.253.253.393zm-1.44-.641a8.35 8.35 0 0 1 .46-.748c.37-.547.809-1.094 1.313-1.606C4.302 3.907 6.028 3 8 3s3.698.907 5.165 2.398c.504.512.942 1.059 1.313 1.606.225.33.378.591.46.748a.532.532 0 0 1 0 .496 8.35 8.35 0 0 1-.46.748 11.477 11.477 0 0 1-1.313 1.606C11.698 12.093 9.972 13 8 13s-3.698-.907-5.165-2.398a11.477 11.477 0 0 1-1.313-1.606 8.35 8.35 0 0 1-.46-.748.532.532 0 0 1 0-.496zM8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-1a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"
/>
);

const Eye = ({ size }: { size: number }) => (
<svg viewBox="0 0 16 16" height={size} width={size}>
{path}
const Eye = ({ size = 16, color = "currentColor" }: { size?: number, color?: string }) => (
<svg viewBox="0 0 16 16" width={size} height={size}>
<path
d="M7.93714155,2.25 C10.6925316,2.25 13.0644381,3.5474639 15.0120889,6.09392839 L15.0120889,6.09392839 L15.2245729,6.37931845 C15.9251426,7.34496039 15.9251423,8.65504801 15.2245721,9.62068962 C13.2427684,12.3523393 10.7977661,13.75 7.93714155,13.75 C5.32242147,13.75 3.05042582,12.5808242 1.15911395,10.2810859 L1.15911395,10.2810859 L0.935939917,10.001851 C0.021352952,8.8257016 0.0213534043,7.17428908 0.935941014,5.99814018 C2.86504406,3.51733636 5.21415744,2.25 7.93714155,2.25 Z M7.93714155,3.75 C5.69615794,3.75 3.76953976,4.78940205 2.11114745,6.92207507 C1.61867778,7.55538525 1.61867754,8.44460631 2.10487085,9.06995757 L2.10487085,9.06995757 L2.31525147,9.33319631 C3.92731093,11.2932821 5.78644871,12.25 7.93714155,12.25 C10.2931542,12.25 12.3047066,11.1001165 14.0193746,8.73667768 C14.3378149,8.29775047 14.3378151,7.70225717 14.0249386,7.27089843 L14.0249386,7.27089843 L13.823795,7.0007303 C12.1518851,4.81487123 10.2051836,3.75 7.93714155,3.75 Z M7.93714155,5.25 C9.4476169,5.25 10.6720991,6.48121694 10.6720991,8 C10.6720991,9.51878306 9.4476169,10.75 7.93714155,10.75 C6.4266662,10.75 5.20218399,9.51878306 5.20218399,8 C5.20218399,6.48121694 6.4266662,5.25 7.93714155,5.25 Z M7.93714155,6.75 C7.25056184,6.75 6.69397902,7.30964406 6.69397902,8 C6.69397902,8.69035594 7.25056184,9.25 7.93714155,9.25 C8.62372126,9.25 9.18030408,8.69035594 9.18030408,8 C9.18030408,7.30964406 8.62372126,6.75 7.93714155,6.75 Z"
fill={color}
fillRule="nonzero"
/>
</svg>
);

Expand Down
25 changes: 16 additions & 9 deletions src/renderer/icons/EyeOff.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@

import React from "react";

const path = (
<path
fill="currentColor"
d="M2.502 8.393c.335.494.731.99 1.184 1.45 1.267 1.286 2.713 2.046 4.304 2.046a5.462 5.462 0 0 0 3.121-1.03c.257-.187.512-.072.708.172.195.244.256.525 0 .71A6.674 6.674 0 0 1 8 13c-1.972 0-3.698-.907-5.165-2.398a11.477 11.477 0 0 1-1.313-1.606 8.35 8.35 0 0 1-.46-.748.532.532 0 0 1 .007-.51 10.965 10.965 0 0 1 3.112-3.48.603.603 0 0 1 .818.105.538.538 0 0 1-.11.779 9.859 9.859 0 0 0-2.64 2.86c.074.12.158.251.253.391zm10.996-.786c-.335-.494-.731-.99-1.184-1.45-1.267-1.286-2.713-2.046-4.315-2.046-.368 0-.734.04-1.091.119a.585.585 0 0 1-.701-.414.555.555 0 0 1 .435-.668c.446-.1.902-.149 1.358-.148 1.972 0 3.698.907 5.165 2.398.504.512.942 1.059 1.313 1.606.225.33.378.591.46.748a.532.532 0 0 1-.007.51 10.821 10.821 0 0 1-1.328 1.868.604.604 0 0 1-.822.067.538.538 0 0 1-.07-.782c.39-.442.738-.916 1.04-1.416a9.37 9.37 0 0 0-.253-.392zm-4.426 2.29a2.225 2.225 0 0 1-3.38-1.306 2.221 2.221 0 0 1 .3-1.775L1.17 1.996a.583.583 0 1 1 .825-.825l12.833 12.833a.583.583 0 1 1-.825.825L9.072 9.896zm-2.26-2.26a1.11 1.11 0 0 0 1.44 1.44l-1.44-1.44z"
/>
);

const EyeOff = ({ size }: { size: number }) => (
const EyeOff = ({ size = 16, color = "currentColor" }: { size?: number, color?: string }) => (
<svg viewBox="0 0 16 16" height={size} width={size}>
{path}
<path
d="M7.93714155,2.25 C9.68406537,2.25 11.2768445,2.77152728 12.7050885,3.80223132 L11.6298024,4.87641394 C10.5046582,4.12161507 9.27697005,3.75 7.93714155,3.75 C5.69615794,3.75 3.76953976,4.78940205 2.11114745,6.92207507 C1.65150909,7.51316457 1.62086633,8.32718088 2.01411663,8.94152306 L2.10487085,9.06995757 L2.31525147,9.33319631 C3.13219679,10.3265113 4.01259603,11.0621444 4.96223773,11.5461668 L3.85887654,12.6482431 C2.97339702,12.1281378 2.14597555,11.425044 1.37902951,10.5414208 L1.15911395,10.2810859 L0.935939917,10.001851 C0.021352952,8.8257016 0.0213534043,7.17428908 0.935941014,5.99814018 C2.86504406,3.51733636 5.21415744,2.25 7.93714155,2.25 Z M7.93714155,5.25 C8.84010511,5.25 9.64086447,5.68999501 10.1389267,6.36838941 L9.05505896,7.45256598 C8.85320083,7.03658147 8.42845547,6.75 7.93714155,6.75 C7.25056184,6.75 6.69397902,7.30964406 6.69397902,8 C6.69397902,8.4916411 6.97625897,8.91698956 7.38674397,9.12112307 L6.30272353,10.2051379 C5.63470369,9.70373673 5.20218399,8.90265637 5.20218399,8 C5.20218399,6.48121694 6.4266662,5.25 7.93714155,5.25 Z"
fill={color}
fillRule="nonzero"
/>
<path
d="M14.8017905,5.82587446 L15.0120889,6.09392839 L15.2245729,6.37931845 C15.9251426,7.34496039 15.9251423,8.65504801 15.2245721,9.62068962 C13.2427684,12.3523393 10.7977661,13.75 7.93714155,13.75 C7.35180402,13.75 6.78364192,13.6914075 6.23308109,13.5746556 L7.56703929,12.2403978 C7.68943795,12.2468023 7.8128025,12.25 7.93714155,12.25 C10.2931542,12.25 12.3047066,11.1001165 14.0193746,8.73667768 C14.3088658,8.33765294 14.3351834,7.80923474 14.1025071,7.39237023 L14.0249386,7.27089843 L13.823795,7.0007303 C13.6738211,6.80465409 13.5216361,6.61759788 13.3672065,6.43952116 L14.425989,5.37982048 C14.552901,5.52361158 14.6781715,5.67230018 14.8017905,5.82587446 Z"
fill={color}
fillRule="nonzero"
/>
<path
d="M14.4696699,0.469669914 C14.7625631,0.176776695 15.2374369,0.176776695 15.5303301,0.469669914 C15.7965966,0.735936477 15.8208027,1.15260016 15.6029482,1.44621165 L15.5303301,1.53033009 L1.53033009,15.5303301 C1.23743687,15.8232233 0.762563133,15.8232233 0.469669914,15.5303301 C0.203403352,15.2640635 0.1791973,14.8473998 0.397051761,14.5537883 L0.469669914,14.4696699 L14.4696699,0.469669914 Z"
fill={color}
fillRule="nonzero"
/>
</svg>
);

Expand Down

0 comments on commit 5738f39

Please sign in to comment.