diff --git a/src/MoreOptionsIconContainer.tsx b/src/MoreOptionsIconContainer.tsx index 22b25b4..6e1f472 100644 --- a/src/MoreOptionsIconContainer.tsx +++ b/src/MoreOptionsIconContainer.tsx @@ -5,6 +5,7 @@ import { IconChevronUp } from './IconChevronUp'; interface IMoreOptionsIconContainer { right: boolean; + isHidden?: boolean; } const MoreOptionsIconContainerStyle = styled.div` @@ -26,6 +27,8 @@ const MoreOptionsIconContainerStyle = styled.div` padding-right: ${props => (props.right ? '10px' : '0px')}; + visibility: ${({ isHidden }) => (isHidden ? 'hidden' : 'visible')}; + :hover { color: hsl(220deg 15% 50%); } @@ -37,6 +40,7 @@ type MoreOptionsIconContainerProps = { | undefined; active: boolean; right?: boolean; + isHidden?: boolean; }; type ReactRef = @@ -47,12 +51,13 @@ type ReactRef = export const MoreOptionsIconContainer = React.forwardRef( (props: MoreOptionsIconContainerProps, ref: ReactRef) => { - const { onClick, active, right } = props; + const { onClick, active, right, isHidden } = props; return ( {!active && } {active && } diff --git a/src/OptionsOverlay.tsx b/src/OptionsOverlay.tsx index ff33f9d..b3cc98c 100644 --- a/src/OptionsOverlay.tsx +++ b/src/OptionsOverlay.tsx @@ -74,7 +74,7 @@ export const OptionsOverlay = ( minHeight={`${convertCardSizes.height}px`} maxHeight={`${convertCardSizes.height}px`} > - {shownMenuOptions.map((option) => { + {shownMenuOptions.map(option => { return ( = props => { if (a.active) return -1; return 0; }) - .map((option) => { + .map(option => { return ( = props => { ref={inOptionsMenuRef} onClick={onInMoreOptionsClick} active={showAdditionalInOptions} + isHidden={menuInOptions.length === 0} /> @@ -153,7 +154,7 @@ export const InOutTextarea: FC = props => { if (a.active) return -1; return 0; }) - .map((option) => { + .map(option => { return ( = props => { ref={outOptionsMenuRef} onClick={onOutMoreOptionsClick} active={showAdditionalOutOptions} + isHidden={menuOutOptions.length === 0} />