refactor: add typescript support to project

This commit is contained in:
HD
2022-06-21 15:08:35 +08:00
parent 88ec2b742a
commit bd799ebea8
259 changed files with 1042 additions and 458 deletions
+27
View File
@@ -0,0 +1,27 @@
import { FC } from "react";
import styled from "styled-components";
import HashIcon from "../../assets/icons/channel.svg";
import LockHashIcon from "../../assets/icons/channel.private.svg";
interface Props {
personal?: boolean;
muted?: boolean;
className: string;
}
const Styled = styled.div`
display: flex;
&.muted path {
fill: #d0d5dd;
}
`;
const ChannelIcon: FC<Props> = ({ personal = false, muted = false, className }) => {
return (
<Styled className={`${muted ? "muted" : ""} ${className}`}>
{personal ? <LockHashIcon /> : <HashIcon />}
</Styled>
);
};
export default ChannelIcon;