mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
refactor table
This commit is contained in:
19
scm-ui/ui-components/src/table/SortIcon.tsx
Normal file
19
scm-ui/ui-components/src/table/SortIcon.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user