revite/src/components/ui/IconButton.tsx

44 lines
807 B
TypeScript
Raw Normal View History

2021-06-19 15:00:30 -04:00
import styled, { css } from "styled-components";
interface Props {
type?: 'default' | 'circle'
}
const normal = `var(--secondary-foreground)`;
const hover = `var(--foreground)`;
export default styled.div<Props>`
z-index: 1;
display: grid;
cursor: pointer;
place-items: center;
fill: ${normal};
color: ${normal};
2021-06-27 06:17:59 -04:00
/*stroke: ${normal};*/
2021-06-19 15:00:30 -04:00
a {
color: ${normal};
}
&:hover {
fill: ${hover};
color: ${hover};
2021-06-27 06:17:59 -04:00
/*stroke: ${hover};*/
2021-06-19 15:00:30 -04:00
a {
color: ${hover};
}
}
${ props => props.type === 'circle' && css`
padding: 4px;
border-radius: 50%;
background-color: var(--secondary-header);
&:hover {
background-color: var(--primary-header);
}
` }
`;