|
123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import { css } from '@tesseract-design/goofy-goober';
-
- export type BadgeBaseArgs = {
- /**
- * Will the component be displayed with circular sides?
- */
- rounded: boolean,
- }
-
- export const Root = ({
- rounded,
- }: BadgeBaseArgs) => css.cx(
- css`
- position: relative;
- height: 1.5em;
- min-width: 1.5em;
- display: inline-grid;
- vertical-align: middle;
- place-content: center;
- overflow: hidden;
- font-stretch: var(--font-stretch-base, normal);
- padding: 0 0.25rem;
- box-sizing: border-box;
- &::before {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: currentColor;
- opacity: 0.25;
- content: '';
- }
- `,
- css.dynamic({
- 'border-radius': rounded ? '0.75em' : '0.25rem',
- }),
- );
-
- export const Content = () => css.cx(
- css`
- position: relative;
- font-size: 0.75em;
- `
- );
|