PromucFlow_constructor/app/client/src/constants/IconConstants.tsx

31 lines
746 B
TypeScript
Raw Normal View History

2019-09-26 11:11:28 +00:00
import styled from "styled-components";
2019-10-21 15:12:45 +00:00
import { Color } from "./Colors";
2019-09-26 11:11:28 +00:00
export type IconProps = {
2020-02-25 11:33:07 +00:00
width?: number;
height?: number;
color?: Color;
background?: Color;
onClick?: (e?: any) => void;
className?: string;
2019-09-26 11:11:28 +00:00
};
export const IconWrapper = styled.div<IconProps>`
&:focus {
outline: none;
}
display: inline-block;
2020-01-27 08:24:58 +00:00
width: ${props => props.width}px;
height: ${props => props.height}px;
2019-09-26 11:11:28 +00:00
svg {
width: ${props => props.width || props.theme.fontSizes[7]}px;
height: ${props => props.height || props.theme.fontSizes[7]}px;
path {
fill: ${props => props.color || props.theme.colors.textOnDarkBG};
}
circle {
fill: ${props => props.background || props.theme.colors.paneBG};
}
2019-09-26 11:11:28 +00:00
}
`;