Minimal styling, powered by Goober.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

37 lignes
628 B

  1. import {css} from '@tesseract-design/goofy-goober';
  2. const getClassName = (borderColor?: string) => css.cx(
  3. css`
  4. padding: 1rem;
  5. `,
  6. css.nest('.child-class')(
  7. css`
  8. color: red;
  9. `,
  10. ),
  11. css.media('(min-width: 600px)')(
  12. css`
  13. padding: 2rem;
  14. `,
  15. ),
  16. css.if(typeof borderColor === 'string')(
  17. css`
  18. border-width: 1px;
  19. border-style: solid;
  20. `
  21. ),
  22. css.dynamic({
  23. 'border-color': borderColor,
  24. }),
  25. )
  26. export default function Home() {
  27. return (
  28. <div className={getClassName('red')}>
  29. <div className="child-class">
  30. Hello World
  31. </div>
  32. </div>
  33. )
  34. }