From 7d7d6e44bfd2eb22414fb39c894d0132ac077d8a Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Fri, 15 Mar 2019 11:41:08 +0100 Subject: [PATCH] allow styles override in Content component --- src/views/Wallet/components/Content/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/Wallet/components/Content/index.js b/src/views/Wallet/components/Content/index.js index d9889747..ca2b0b73 100644 --- a/src/views/Wallet/components/Content/index.js +++ b/src/views/Wallet/components/Content/index.js @@ -18,6 +18,7 @@ import FirmwareUnsupported from './components/FirmwareUnsupported'; import l10nMessages from './index.messages'; type Props = { + className?: string, children?: React.Node, isLoading?: boolean, loader?: $ElementType<$ElementType, 'loader'>, @@ -76,8 +77,8 @@ const getExceptionPage = exceptionPage => { } }; -const Content = ({ children, isLoading = false, loader, exceptionPage }: Props) => ( - +const Content = ({ className, children, isLoading = false, loader, exceptionPage }: Props) => ( + {!isLoading && children} {isLoading && exceptionPage && getExceptionPage(exceptionPage)} {isLoading && loader && ( @@ -98,6 +99,7 @@ const Content = ({ children, isLoading = false, loader, exceptionPage }: Props) Content.propTypes = { children: PropTypes.oneOfType([PropTypes.element, PropTypes.array]), + className: PropTypes.string, isLoading: PropTypes.bool, loader: PropTypes.object, exceptionPage: PropTypes.object,