refactor table

This commit is contained in:
Eduard Heimbuch
2019-12-02 13:58:56 +01:00
parent dc169ecff9
commit 52057abef5
6 changed files with 92 additions and 41 deletions

View File

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