mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 04:48:00 +03:00
landscape: add border prop to loading
Prevents borders showing when loading channels. Also spaces the text beside the spinner.
This commit is contained in:
parent
8ba29acc15
commit
75c90ea4a5
@ -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>
|
||||
);
|
||||
|
@ -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>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user