This commit is contained in:
Eduard Heimbuch
2019-12-02 14:03:50 +01:00
parent 52057abef5
commit 75468483cf
2 changed files with 9 additions and 9 deletions

View File

@@ -4,16 +4,16 @@ import Icon from "../Icon";
type Props = {
name: string;
isHidden: boolean;
isVisible: boolean;
};
const IconWithMarginLeft = styled(Icon)`
visibility: ${(props: Props) => (props.isHidden ? "hidden" : "visible")};
visibility: ${(props: Props) => (props.isVisible ? "visible" : "hidden")};
margin-left: 0.25em;
`;
const SortIcon: FC<Props> = (props: Props) => {
return <IconWithMarginLeft name={props.name} isHidden={props.isHidden} />;
return <IconWithMarginLeft name={props.name} isVisible={props.isVisible} />;
};
export default SortIcon;