fix(Editor): add reset/delete actions to each category (fixes #302)

This commit is contained in:
41666 2021-07-13 22:59:05 -04:00
parent 5dce2fc949
commit 5671a408c1
5 changed files with 63 additions and 8 deletions

View file

@ -3,9 +3,18 @@ import { fontCSS } from '@roleypoly/design-system/atoms/fonts';
import { text300, text400 } from '@roleypoly/design-system/atoms/typography';
import styled, { css } from 'styled-components';
export const IconContainer = styled.div`
export const IconContainer = styled.div<{ small?: boolean }>`
margin-right: 0.6rem;
font-size: 1.75em;
${(props) =>
props.small &&
css`
margin-right: 0.2rem;
font-size: 1.25em;
position: relative;
top: 2px;
`}
`;
const base = css`

View file

@ -31,7 +31,9 @@ export const Button = (props: ButtonProps) => {
onClick={props.onClick}
disabled={props.disabled}
>
{props.icon && <IconContainer>{props.icon}</IconContainer>}
{props.icon && (
<IconContainer small={props.size === 'small'}>{props.icon}</IconContainer>
)}
<div>{props.children}</div>
</StyledButton>
);