mirror of
https://github.com/trezor/trezor-wallet
synced 2025-02-11 23:52:47 +00:00
allow styles override in Content component
This commit is contained in:
parent
19cdb097f9
commit
7d7d6e44bf
@ -18,6 +18,7 @@ import FirmwareUnsupported from './components/FirmwareUnsupported';
|
|||||||
import l10nMessages from './index.messages';
|
import l10nMessages from './index.messages';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
className?: string,
|
||||||
children?: React.Node,
|
children?: React.Node,
|
||||||
isLoading?: boolean,
|
isLoading?: boolean,
|
||||||
loader?: $ElementType<$ElementType<State, 'selectedAccount'>, 'loader'>,
|
loader?: $ElementType<$ElementType<State, 'selectedAccount'>, '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) => (
|
||||||
<Wrapper>
|
<Wrapper className={className}>
|
||||||
{!isLoading && children}
|
{!isLoading && children}
|
||||||
{isLoading && exceptionPage && getExceptionPage(exceptionPage)}
|
{isLoading && exceptionPage && getExceptionPage(exceptionPage)}
|
||||||
{isLoading && loader && (
|
{isLoading && loader && (
|
||||||
@ -98,6 +99,7 @@ const Content = ({ children, isLoading = false, loader, exceptionPage }: Props)
|
|||||||
|
|
||||||
Content.propTypes = {
|
Content.propTypes = {
|
||||||
children: PropTypes.oneOfType([PropTypes.element, PropTypes.array]),
|
children: PropTypes.oneOfType([PropTypes.element, PropTypes.array]),
|
||||||
|
className: PropTypes.string,
|
||||||
isLoading: PropTypes.bool,
|
isLoading: PropTypes.bool,
|
||||||
loader: PropTypes.object,
|
loader: PropTypes.object,
|
||||||
exceptionPage: PropTypes.object,
|
exceptionPage: PropTypes.object,
|
||||||
|
Loading…
Reference in New Issue
Block a user