Files
SCM-Manager/scm-ui/ui-components/src/table/SortIcon.tsx

20 lines
462 B
TypeScript
Raw Normal View History

2019-12-02 13:58:56 +01:00
import React, { FC } from "react";
import styled from "styled-components";
import Icon from "../Icon";
type Props = {
name: string;
2019-12-02 14:03:50 +01:00
isVisible: boolean;
2019-12-02 13:58:56 +01:00
};
const IconWithMarginLeft = styled(Icon)`
2019-12-02 14:03:50 +01:00
visibility: ${(props: Props) => (props.isVisible ? "visible" : "hidden")};
2019-12-02 13:58:56 +01:00
margin-left: 0.25em;
`;
const SortIcon: FC<Props> = (props: Props) => {
2019-12-02 14:03:50 +01:00
return <IconWithMarginLeft name={props.name} isVisible={props.isVisible} />;
2019-12-02 13:58:56 +01:00
};
export default SortIcon;