fix: replaced eye svgs with better aligned ones

fixed style position
pull/3056/head
William Grant 12 months ago
parent 036f9ebdc8
commit c93cc932fc

@ -241,13 +241,13 @@ export const icons: Record<SessionIconType, IconProps> = {
ratio: 1,
},
eye: {
path: 'M11.44 14.28c6.63 0 11.1-5.34 11.1-7 0-1.65-4.48-7-11.1-7C4.91.29.33 5.64.33 7.29c0 1.66 4.57 7 11.11 7Zm0-1.55c-5.17 0-9.28-4.32-9.28-5.45 0-.94 4.1-5.44 9.28-5.44 5.15 0 9.28 4.5 9.28 5.44 0 1.13-4.13 5.45-9.28 5.45Zm0-1.09a4.38 4.38 0 0 0 4.37-4.36 4.34 4.34 0 0 0-4.37-4.35 4.34 4.34 0 0 0-4.38 4.35 4.39 4.39 0 0 0 4.38 4.36Zm0-2.94a1.41 1.41 0 1 1 0-2.82c.78 0 1.42.62 1.42 1.4 0 .78-.64 1.42-1.42 1.42Z',
viewBox: '0 0 23 15',
path: 'M37.5,55.3c15.9,0,26.7-12.9,26.7-16.8s-10.8-16.8-26.7-16.8-26.7,12.8-26.7,16.8,11,16.8,26.7,16.8Z M37.5,51.6c-12.4,0-22.3-10.4-22.3-13.1s9.9-13.1,22.3-13.1,22.3,10.8,22.3,13.1-9.9,13.1-22.3,13.1Z M37.5,27.5c-6.1,0-11,4.8-11,11,0,6,4.9,11,11,11s11-5,11-11-4.9-11-11-11ZM37.5,42c-2,0-3.6-1.6-3.6-3.6s1.6-3.5,3.6-3.5,3.6,1.6,3.6,3.5-1.6,3.6-3.6,3.6Z',
viewBox: '0 0 75 76',
ratio: 1,
},
eyeDisabled: {
path: 'M37.2 55.2c3.7 0 7-.6 10-1.7L44.8 51c-2.3.7-4.8 1.1-7.5 1.1C24.3 52.1 14 41.2 14 38.5c0-1.4 3.6-6 9.4-9.4l-2.5-2.5c-6.5 4-10.4 9.5-10.4 11.9 0 4 11.2 16.7 26.8 16.7Zm0-33.5c-3.4 0-6.5.6-9.4 1.5l2.6 2.6a23 23 0 0 1 6.8-1c13 0 23.4 11.3 23.4 13.7 0 1.5-3.4 5.8-8.9 9.1l2.4 2.4c6.3-4 10-9.2 10-11.5 0-4-11-16.8-26.9-16.8Zm0 27.7c1.8 0 3.4-.4 4.8-1.1L27.3 33.6a11 11 0 0 0 9.9 15.8Zm10.1-6.7c.6-1.3 1-2.7 1-4.2a11 11 0 0 0-15.4-10.1l14.4 14.3Zm5.2 12.7c.6.6 1.5.6 2.1 0 .7-.6.6-1.5 0-2.1L21.8 20.6c-.6-.6-1.5-.6-2.1 0-.6.5-.6 1.5 0 2.1l32.8 32.7Z',
viewBox: '0 0 74 76',
path: 'M37.5,55.2c3.7,0,7-.7,10-1.7l-2.6-2.6c-2.3.7-4.8,1.2-7.5,1.2-12.9,0-23.4-10.9-23.4-13.7s3.6-5.9,9.4-9.4l-2.5-2.4c-6.5,4-10.4,9.5-10.4,11.8,0,4,11.1,16.8,26.8,16.8ZM37.5,21.7c-3.4,0-6.5.6-9.4,1.5l2.6,2.6c2.2-.7,4.5-1,6.8-1,12.9,0,23.3,11.4,23.3,13.7s-3.4,5.8-8.8,9.2l2.4,2.4c6.2-4,9.9-9.3,9.9-11.6,0-4-11-16.8-26.8-16.8ZM37.5,49.4c1.8,0,3.4-.4,4.8-1.2l-14.7-14.7c-.8,1.5-1.1,3.2-1.1,4.8,0,6.1,5,11,11,11ZM47.6,42.7c.6-1.3.9-2.8.9-4.3,0-6.1-4.9-11-11-11s-3,.3-4.3.9c0,0,14.4,14.4,14.4,14.4ZM52.8,55.4c.6.6,1.5.6,2.1,0,.6-.7.6-1.5,0-2.1L22.1,20.6c-.6-.6-1.5-.6-2.1,0-.6.6-.6,1.5,0,2.1l32.8,32.7h0Z',
viewBox: '0 0 75 76',
ratio: 1,
},
exit: {

@ -71,8 +71,13 @@ const ErrorItem = (props: { id: string; error: string }) => {
const ShowHideButton = (props: { forceShow: boolean; toggleForceShow: Noop; error: boolean }) => {
const htmlDirection = useHTMLDirection();
const position =
htmlDirection === 'ltr' ? { right: 'var(--margins-md)' } : { left: 'var(--margins-md)' };
const style = {
position: 'absolute',
top: '50%',
transform: 'translateY(-50%)',
left: htmlDirection === 'ltr' ? undefined : 'var(--margins-sm)',
right: htmlDirection === 'ltr' ? 'var(--margins-sm)' : undefined,
};
if (props.forceShow) {
return (
@ -80,17 +85,8 @@ const ShowHideButton = (props: { forceShow: boolean; toggleForceShow: Noop; erro
iconType={'eyeDisabled'}
iconColor={props.error ? 'var(--danger-color)' : 'var(--text-primary-color)'}
iconSize="huge"
iconPadding="1.25px"
padding={'0'}
onClick={props.toggleForceShow}
style={{
marginTop: '-0.25px',
marginRight: '0.5px',
position: 'absolute',
top: '50%',
transform: 'translateY(-50%)',
...position,
}}
style={style}
dataTestId="reveal-recovery-phrase-toggle"
/>
);
@ -100,9 +96,9 @@ const ShowHideButton = (props: { forceShow: boolean; toggleForceShow: Noop; erro
<SessionIconButton
iconType={'eye'}
iconColor={props.error ? 'var(--danger-color)' : 'var(--text-primary-color)'}
iconSize="medium"
iconSize="huge"
onClick={props.toggleForceShow}
style={{ position: 'absolute', top: '50%', transform: 'translateY(-50%)', ...position }}
style={style}
dataTestId="reveal-recovery-phrase-toggle"
/>
);

Loading…
Cancel
Save