* feat: add node swicther * chore: remove hook form from node switcher * feat: generate apollo types and add tests * fix: format * fix: types * fix: remove redundant wrapper * fix: layout styles * fix: add controlled value to radio group * fix: flaky node hook test * feat: hook in node switcher to the explorer & token footer info * fix: cache key handling for env config * fix: env type in tests * fix: format again * fix: use netlify git env vars * fix: remove commented styles * fix: replace clsx with classnames * fix: dialog sizes * fix: fetch config by default * fix: format * fix: dialog close
27 lines
574 B
TypeScript
27 lines
574 B
TypeScript
import type { ReactNode } from 'react';
|
|
import classnames from 'classnames';
|
|
import { t } from '@vegaprotocol/react-helpers';
|
|
|
|
type LayoutCellProps = {
|
|
hasError?: boolean;
|
|
isLoading?: boolean;
|
|
children?: ReactNode;
|
|
};
|
|
|
|
export const LayoutCell = ({
|
|
hasError,
|
|
isLoading,
|
|
children,
|
|
}: LayoutCellProps) => {
|
|
return (
|
|
<div
|
|
className={classnames('px-8 text-right', {
|
|
'text-danger': !isLoading && hasError,
|
|
'text-white-60 dark:text-black-60': isLoading,
|
|
})}
|
|
>
|
|
{isLoading ? t('Checking') : children || '-'}
|
|
</div>
|
|
);
|
|
};
|