From 7e72f008d69abb9bb0531b58f052999f2643af11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=ABck=20V=C3=A9zien?= Date: Wed, 31 Jan 2018 15:40:41 +0100 Subject: [PATCH] Add GrowScroll in Modal --- src/components/base/GrowScroll/index.js | 17 ++++++++++++++--- src/components/base/Modal/index.js | 11 +++++++---- src/main/app.js | 5 ----- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/components/base/GrowScroll/index.js b/src/components/base/GrowScroll/index.js index afc28f5e..ed81bdad 100644 --- a/src/components/base/GrowScroll/index.js +++ b/src/components/base/GrowScroll/index.js @@ -7,13 +7,15 @@ import noop from 'lodash/noop' import Box from 'components/base/Box' type Props = { - maxHeight?: number, children: any, + full: boolean, + maxHeight?: number, onUpdate: Function, } class GrowScroll extends PureComponent { static defaultProps = { + full: false, onUpdate: noop, } @@ -34,10 +36,19 @@ class GrowScroll extends PureComponent { _scrollbar = undefined render() { - const { onUpdate, children, maxHeight, ...props } = this.props + const { onUpdate, children, maxHeight, full, ...props } = this.props return ( - + { {(m, isVisible) => ( - - {render({ data, onClose })} - + + + {render({ data, onClose })} + + )} diff --git a/src/main/app.js b/src/main/app.js index 30f57352..0bbe8d3a 100644 --- a/src/main/app.js +++ b/src/main/app.js @@ -80,11 +80,6 @@ const installExtensions = async () => { app.setAsDefaultProtocolClient('ledgerhq') -app.on('open-url', (e, url) => { - e.preventDefault() - console.log('open url', e, url) -}) - app.on('ready', async () => { if (__DEV__) { await installExtensions()