Minimal styling, powered by Goober.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
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. }