landscape: add border prop to loading

Prevents borders showing when loading channels.

Also spaces the text beside the spinner.
This commit is contained in:
Matilde Park 2021-02-25 19:18:29 -05:00
parent 8ba29acc15
commit 75c90ea4a5
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ import { Box } from '@tlon/indigo-react';
export function Body(
props: { children: ReactNode } & Parameters<typeof Box>[0]
) {
const { children, ...boxProps } = props;
const { children, border, ...boxProps } = props;
return (
<Box fontSize={0} px={[0, 3]} pb={[0, 3]} height="100%" width="100%">
<Box
@ -13,11 +13,11 @@ export function Body(
height="100%"
width="100%"
borderRadius={2}
border={[0, 1]}
border={border ? border : [0, 1]}
borderColor={['washedGray', 'washedGray']}
{...boxProps}
>
{props.children}
{children}
</Box>
</Box>
);

View File

@ -8,10 +8,10 @@ interface LoadingProps {
}
export function Loading({ text }: LoadingProps) {
return (
<Body>
<Body border="0">
<Center height="100%">
<LoadingSpinner />
{Boolean(text) && <Text>{text}</Text>}
{Boolean(text) && <Text ml={4}>{text}</Text>}
</Center>
</Body>
);