lukeed/clsxPublic

A tiny (239B) utility for constructing `className` strings conditionally.

fix: allow `bigint` in typings #96

MergedViliamKopeckymerged 1 commit intomasterfromrefs/pull/96/head
  1. VI

    `ReactNode` from `@types/react` now includes `bigint` (and its `0n` zero which is falsy) and that is incompatible with `clsx` in these scenarios:

    ```tsx declare const x: ReactNode

    const className = clsx(x && 'some-class') // Argument of type 'false | "" | 0 | 0n | "some-class" | null | undefined' is not assignable to parameter of type 'ClassValue'. // Type '0n' is not assignable to type 'ClassValue'. ```

  2. lukeedmentioned2 years ago on GitHub

  3. lukeedsubscribed2 years ago on GitHub

  4. Netailreferenced this in fix: new @types/react support #3922 years ago on GitHub

  5. LU

    Thanks! I’ll merge and publish tomorrow. Traveling for work right now & haven’t had a chance to open laptop

  6. lukeedmerged 3d960ab0fd7c2 years ago on GitHub

  7. lukeedclosed2 years ago on GitHub

  8. LU

    Included in `2.1.1`

  9. snyk-io[bot]botreferenced this in [Snyk] Upgrade clsx from 2.1.0 to 2.1.1 #42 years ago on GitHub

  10. vigneshshettyinreferenced this in [Snyk] Upgrade clsx from 2.1.0 to 2.1.1 #962 years ago on GitHub

  11. thomassimmerreferenced this in [Snyk] Upgrade clsx from 2.1.0 to 2.1.1 #82 years ago on GitHub

  12. rong4ivyreferenced this in [Snyk] Upgrade clsx from 2.1.0 to 2.1.1 #42 years ago on GitHub

  13. JuanPabloDiazreferenced this in [Snyk] Upgrade clsx from 2.1.0 to 2.1.1 #212 years ago on GitHub

  14. rsazreferenced this in [Snyk] Upgrade clsx from 2.0.0 to 2.1.1 #512 years ago on GitHub

  15. angelorealereferenced this in [Snyk] Upgrade clsx from 2.1.0 to 2.1.1 #52 years ago on GitHub

  16. filipeoliveiraareferenced this in [Snyk] Upgrade clsx from 2.1.0 to 2.1.1 #72 years ago on GitHub

  17. zntbreferenced this in [Snyk] Upgrade clsx from 2.1.0 to 2.1.1 #292 years ago on GitHub

  18. zntbreferenced this in [Snyk] Upgrade clsx from 2.1.0 to 2.1.1 #332 years ago on GitHub

  19. ZeroXClemreferenced this in [Snyk] Upgrade clsx from 2.1.0 to 2.1.1 #52 years ago on GitHub

  20. salgadevreferenced this in [Snyk] Upgrade clsx from 2.0.0 to 2.1.1 #172 years ago on GitHub

  21. zntbreferenced this in [Snyk] Upgrade: , , clsx, lucide-react, next-themes, react-hook-form, react-router-dom, tailwind-merge #262 years ago on GitHub

  22. wierzareferenced this in [Snyk] Upgrade clsx from 2.0.0 to 2.1.1 #1472 years ago on GitHub

  23. Netailunsubscribedlast year on GitHub

  24. SA

    <!-- This --> <span class:list={[ 'hello goodbye', { world: true }, [ 'friend' ] ]} /> <!-- Becomes --> <span class="hello goodbye world friend"></span>

  25. coderabbitai[bot]botreferenced this in [FEAT] 개인 캘린더 — 상세 조회 리스트 아이템 마커 정렬 · 완료 상태 라벨 #133 #1353 months ago on GitHub