mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-15 17:19:10 +00:00
fix(Editor): add reset/delete actions to each category (fixes #302)
This commit is contained in:
parent
5dce2fc949
commit
5671a408c1
5 changed files with 63 additions and 8 deletions
|
@ -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`
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue