From 225524b497de285eef4286138ececd958c697db0 Mon Sep 17 00:00:00 2001 From: meriadec Date: Tue, 3 Jul 2018 17:04:29 +0200 Subject: [PATCH] Update DeviceInteraction icons style --- .../DeviceInteraction/components.js | 20 ++++++++++-- src/components/EnsureDeviceApp.js | 4 +-- src/components/GenuineCheck.js | 8 ++--- src/icons/GenuineCheck.js | 32 ------------------- src/icons/Home.js | 20 +++--------- src/icons/SmoothBorders.js | 18 +++++++++++ src/icons/Usb.js | 23 ++++--------- 7 files changed, 53 insertions(+), 72 deletions(-) delete mode 100644 src/icons/GenuineCheck.js create mode 100644 src/icons/SmoothBorders.js diff --git a/src/components/DeviceInteraction/components.js b/src/components/DeviceInteraction/components.js index 0e60f771..a81e425f 100644 --- a/src/components/DeviceInteraction/components.js +++ b/src/components/DeviceInteraction/components.js @@ -12,6 +12,7 @@ import Spinner from 'components/base/Spinner' import IconCheck from 'icons/Check' import IconCross from 'icons/Cross' import IconExclamationCircle from 'icons/ExclamationCircle' +import IconSmoothBorders from 'icons/SmoothBorders' export const DeviceInteractionStepContainer = styled(Box).attrs({ horizontal: true, @@ -34,6 +35,19 @@ export const DeviceInteractionStepContainer = styled(Box).attrs({ border-top-right-radius: ${p => (p.isFirst ? `${radii[1]}px` : 0)}; ` +const AbsCenter = styled.div` + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: flex; + align-items: center; + justify-content: center; +` + +const smoothBorders = + export const IconContainer = ({ children, isTransparent, @@ -42,15 +56,15 @@ export const IconContainer = ({ isTransparent: boolean, }) => ( - {children} + {smoothBorders} + {children} ) diff --git a/src/components/EnsureDeviceApp.js b/src/components/EnsureDeviceApp.js index 23385b67..edbc3f7e 100644 --- a/src/components/EnsureDeviceApp.js +++ b/src/components/EnsureDeviceApp.js @@ -27,7 +27,7 @@ import { getCurrentDevice } from 'reducers/devices' export const WrongAppOpened = createCustomErrorClass('WrongAppOpened') export const WrongDeviceForAccount = createCustomErrorClass('WrongDeviceForAccount') -const usbIcon = +const usbIcon = const Bold = props => const mapStateToProps = state => ({ @@ -107,7 +107,7 @@ class EnsureDeviceApp extends Component<{ { id: 'address', title: this.renderOpenAppTitle, - icon: Icon ? : null, + icon: Icon ? : null, run: this.openAppInteractionHandler, }, ]} diff --git a/src/components/GenuineCheck.js b/src/components/GenuineCheck.js index e1f8e2bc..f00a0e8e 100644 --- a/src/components/GenuineCheck.js +++ b/src/components/GenuineCheck.js @@ -24,7 +24,7 @@ import Text from 'components/base/Text' import IconUsb from 'icons/Usb' import IconHome from 'icons/Home' -import IconGenuineCheck from 'icons/GenuineCheck' +import IconCheck from 'icons/Check' const DeviceNotGenuineError = createCustomErrorClass('DeviceNotGenuine') @@ -36,9 +36,9 @@ type Props = { device: ?Device, } -const usbIcon = -const homeIcon = -const genuineCheckIcon = +const usbIcon = +const homeIcon = +const genuineCheckIcon = const mapStateToProps = state => ({ device: getCurrentDevice(state), diff --git a/src/icons/GenuineCheck.js b/src/icons/GenuineCheck.js deleted file mode 100644 index 791c0ff4..00000000 --- a/src/icons/GenuineCheck.js +++ /dev/null @@ -1,32 +0,0 @@ -// @flow - -import React, { Fragment } from 'react' - -const path = ( - - - - -) - -export default ({ size, ...p }: { size: number }) => ( - - {path} - -) diff --git a/src/icons/Home.js b/src/icons/Home.js index cc38981f..4c4b509e 100644 --- a/src/icons/Home.js +++ b/src/icons/Home.js @@ -4,29 +4,19 @@ import React, { Fragment } from 'react' const path = ( - ) export default ({ size, ...p }: { size: number }) => ( - + {path} ) diff --git a/src/icons/SmoothBorders.js b/src/icons/SmoothBorders.js new file mode 100644 index 00000000..e69e67e2 --- /dev/null +++ b/src/icons/SmoothBorders.js @@ -0,0 +1,18 @@ +// @flow + +import React from 'react' + +const inner = ( + +) + +export default ({ size, ...p }: { size: number }) => ( + + {inner} + +) diff --git a/src/icons/Usb.js b/src/icons/Usb.js index 45be58c8..32870e01 100644 --- a/src/icons/Usb.js +++ b/src/icons/Usb.js @@ -2,24 +2,15 @@ import React from 'react' -const group = ( - - - - +const inner = ( + ) export default ({ size, ...p }: { size: number }) => ( - - {group} + + {inner} )