Skip to content

Releases: sannajammeh/tw-classed

@tw-classed/core@1.3.2-canary.1

12 Dec 21:12
5d51ac0
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • 091ef6a4 Thanks @sannajammeh! - Adds support in core lib for class & className when calling a class producer function

    Example:

    const button = classed("bg-blue-500");
    
    // LitHTML
    html`<button class=${button({ class: "text-white" })}>Click me</button>`;

@tw-classed/react@1.3.2-canary.0

11 Dec 15:15
59b5f38
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • #65 df315431 Thanks @sannajammeh! - This patch adds support for Typescript interoperability between the @tw-classed/core and @tw-classed/react packages. This makes it possible to use the @tw-classed/core in a framework agnostic design system and then use the @tw-classed/react in a React application.

    // Design system
    import { classed } from "@tw-classed/core";
    
    export const button = classed({
      base: "bg-blue-500 text-white",
      variants: {
        size: {
          sm: "px-2 py-1 text-sm",
          md: "px-3 py-2 text-base",
          lg: "px-4 py-3 text-lg",
        },
      },
    });
    
    // React application
    import { button } from "design-system";
    import { classed } from "@tw-classed/react";
    
    export const Button = classed.button(button); // Variants are automatically inferred

@tw-classed/react@1.3.1

09 Dec 23:24
a83eea1
Compare
Choose a tag to compare

Patch Changes

@tw-classed/react@1.3.0

08 Dec 01:02
3bf7118
Compare
Choose a tag to compare

This release adds support for the createClassed API to configure classed. Currently only the merger prop is supported as config

You can build your own or use tailwind-merge

// Classed.config.ts
import { twMerge } from "tailwind-merge";

export const { classed } = createClassed({
    merger: twMerge,
});

Minor Changes

  • #52 47437bca Thanks @sannajammeh! - Add createClassed API to extend the classed function with additional functionality. Currently only "merger" prop is supported

Patch Changes

@tw-classed/core@1.3.0

08 Dec 01:02
3bf7118
Compare
Choose a tag to compare

Patch Changes

@tw-classed/react@1.3.0-canary.4

08 Dec 00:43
373fa8a
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • e7596bb9 Thanks @sannajammeh! - Fixes "This module is a CJS module" in node.js with type:"module"

  • Updated dependencies [e7596bb9]:

    • @tw-classed/core@1.3.0-canary.4

@tw-classed/core@1.3.0-canary.4

08 Dec 00:43
373fa8a
Compare
Choose a tag to compare
Pre-release

Patch Changes

@tw-classed/react@1.3.0-canary.3

07 Dec 23:37
c2bb97d
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • Updated dependencies [f328e321]:
    • @tw-classed/core@1.3.0-canary.3

@tw-classed/react@1.3.0-canary.2

07 Dec 20:01
9791b70
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • 29570c7e Thanks @sannajammeh! - Export DerivedComponentType to handle as prop in derived components

  • Updated dependencies [29570c7e]:

    • @tw-classed/core@1.3.0-canary.2

@tw-classed/core@1.3.0-canary.3

07 Dec 23:37
c2bb97d
Compare
Choose a tag to compare
Pre-release

Patch Changes