Website for showcasing all features of Tesseract Web.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

43 行
823 B

  1. import { css } from '@tesseract-design/css-utils';
  2. export type BadgeBaseArgs = {
  3. rounded: boolean,
  4. }
  5. export const Root = ({
  6. rounded,
  7. }: BadgeBaseArgs) => css.cx(
  8. css`
  9. position: relative;
  10. height: 1.5em;
  11. min-width: 1.5em;
  12. display: inline-grid;
  13. vertical-align: middle;
  14. place-content: center;
  15. overflow: hidden;
  16. font-stretch: var(--font-stretch-base, normal);
  17. padding: 0 0.25rem;
  18. box-sizing: border-box;
  19. &::before {
  20. position: absolute;
  21. top: 0;
  22. left: 0;
  23. width: 100%;
  24. height: 100%;
  25. background-color: currentColor;
  26. opacity: 0.25;
  27. content: '';
  28. }
  29. `,
  30. css.dynamic({
  31. 'border-radius': rounded ? '0.75em' : '0.25rem',
  32. }),
  33. );
  34. export const Content = () => css.cx(
  35. css`
  36. position: relative;
  37. font-size: 0.75em;
  38. `
  39. );