From aa04c35e73ddd1f2d38de68e437c0c3d697d42e2 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 24 Apr 2021 18:43:52 +0300 Subject: feat: add loading indicator stubs --- src/containers/Page.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/containers') diff --git a/src/containers/Page.tsx b/src/containers/Page.tsx index 887e839..2d6fd14 100644 --- a/src/containers/Page.tsx +++ b/src/containers/Page.tsx @@ -7,15 +7,21 @@ interface Props { title?: string; actions?: Action[]; filters?: JSX.Element; + isValidating?: boolean; className?: string; } const style = 'mb-2 flex justify-between md:flex-row md:items-center'; -const Page: React.FC = ({ title, actions, filters, className, children }) => ( - -
1 ? 'flex-col items-start' : 'flex-row items-center'}`}> - {title} +const Spinner: React.FC = () => <> O; // TODO: replace with spinner + +const Page: React.FC = ({ title, actions, filters, isValidating, className, children }) => ( + +
+ + {title} + {isValidating && } +
{filters} {actions?.map(action => ())} -- cgit v1.2.3