mirror of
https://github.com/outline/outline.git
synced 2026-11-21 05:24:03 +03:00
* Upgrade Prettier to v3.6.2 and eslint-plugin-prettier to v5.5.1 - Upgraded prettier from ^2.8.8 to ^3.6.2 (latest version) - Upgraded eslint-plugin-prettier from ^4.2.1 to ^5.5.1 for compatibility - Applied automatic formatting changes from new Prettier version - All existing ESLint and Prettier configurations remain compatible * Applied automatic fixes * Trigger CI --------- Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com> Co-authored-by: Tom Moor <tom@getoutline.com>
27 lines
741 B
TypeScript
27 lines
741 B
TypeScript
import { transparentize } from "polished";
|
|
import styled from "styled-components";
|
|
|
|
const Badge = styled.span<{ yellow?: boolean; primary?: boolean }>`
|
|
margin-left: 10px;
|
|
padding: 1px 5px 2px;
|
|
background-color: ${({ yellow, primary, theme }) =>
|
|
yellow ? theme.yellow : primary ? theme.accent : "transparent"};
|
|
color: ${({ primary, yellow, theme }) =>
|
|
primary
|
|
? theme.accentText
|
|
: yellow
|
|
? theme.almostBlack
|
|
: theme.textTertiary};
|
|
border: 1px solid
|
|
${({ primary, yellow, theme }) =>
|
|
primary || yellow
|
|
? "transparent"
|
|
: transparentize(0.4, theme.textTertiary)};
|
|
border-radius: 10px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
user-select: none;
|
|
`;
|
|
|
|
export default Badge;
|