improvement(editor): remove button background for editor status (#1435)

This commit is contained in:
Derek Newsom
2018-08-24 15:52:53 -07:00
committed by Shawn Erquhart
parent 06d3650fac
commit d0f4821a19
2 changed files with 30 additions and 9 deletions

View File

@ -113,13 +113,24 @@ const shadows = {
`, `,
}; };
const textBadge = css` const badge = css`
font-size: 13px; font-size: 13px;
line-height: 1;
`;
const backgroundBadge = css`
${badge};
display: block;
border-radius: ${lengths.borderRadius}; border-radius: ${lengths.borderRadius};
padding: 4px 10px; padding: 4px 10px;
text-align: center; text-align: center;
`;
const textBadge = css`
${badge};
display: inline-block; display: inline-block;
line-height: 1; font-weight: 700;
text-transform: uppercase;
`; `;
const card = css` const card = css`
@ -201,20 +212,32 @@ const components = {
border-top: 6px solid currentColor; border-top: 6px solid currentColor;
border-radius: 2px; border-radius: 2px;
`, `,
badge: css`
${backgroundBadge};
color: ${colors.infoText};
background-color: ${colors.infoBackground};
`,
badgeSuccess: css`
${backgroundBadge};
color: ${colors.successText};
background-color: ${colors.successBackground};
`,
badgeDanger: css`
${backgroundBadge};
color: ${colorsRaw.red};
background-color: #fbe0d7;
`,
textBadge: css` textBadge: css`
${textBadge}; ${textBadge};
color: ${colors.infoText}; color: ${colors.infoText};
background-color: ${colors.infoBackground};
`, `,
textBadgeSuccess: css` textBadgeSuccess: css`
${textBadge}; ${textBadge};
color: ${colors.successText}; color: ${colors.successText};
background-color: ${colors.successBackground};
`, `,
textBadgeDanger: css` textBadgeDanger: css`
${textBadge}; ${textBadge};
color: ${colorsRaw.red}; color: ${colorsRaw.red};
background-color: #fbe0d7;
`, `,
loaderSize: css` loaderSize: css`
width: 2.28571429rem; width: 2.28571429rem;

View File

@ -38,14 +38,12 @@ const FileName = styled.span`
const FileWidgetButton = styled.button` const FileWidgetButton = styled.button`
${buttons.button}; ${buttons.button};
${components.textBadge}; ${components.badge};
display: block;
`; `;
const FileWidgetButtonRemove = styled.button` const FileWidgetButtonRemove = styled.button`
${buttons.button}; ${buttons.button};
${components.textBadgeDanger}; ${components.badgeDanger};
display: block;
`; `;
export default function withFileControl({ forImage } = {}) { export default function withFileControl({ forImage } = {}) {