import { Flex, chakra } from '@chakra-ui/react'; import React from 'react'; import { useIsSticky } from 'toolkit/hooks/useIsSticky'; type Props = { children: React.ReactNode; className?: string; showShadow?: boolean; }; export const ACTION_BAR_HEIGHT_DESKTOP = 24 + 32 + 12; export const ACTION_BAR_HEIGHT_MOBILE = 24 + 32 + 24; const ActionBar = ({ children, className, showShadow }: Props) => { const ref = React.useRef(null); const isSticky = useIsSticky(ref, 5); if (!React.Children.toArray(children).filter(Boolean).length) { return null; } return ( { children } ); }; export default chakra(ActionBar);