diff --git a/.github/composite-actions/install/action.yml b/.github/composite-actions/install/action.yml index ee80fd9..69b2c9e 100644 --- a/.github/composite-actions/install/action.yml +++ b/.github/composite-actions/install/action.yml @@ -4,9 +4,9 @@ description: "Sets up Node.js and runs install" runs: using: composite steps: - - uses: pnpm/action-setup@v2.2.4 + - uses: pnpm/action-setup@v4 with: - version: 8 + version: 9 - name: Setup Node.js uses: actions/setup-node@v3 diff --git a/src/index.test.tsx b/src/index.test.tsx index 8d82a5c..b102d90 100644 --- a/src/index.test.tsx +++ b/src/index.test.tsx @@ -279,4 +279,20 @@ describe("twc", () => { expect(svg).toBeDefined(); expect(svg.tagName).toBe("SVG"); }); + + test("component props from attrs should respect provided transient props", () => { + type ButtonProps = TwcComponentProps<"button"> & { + variant: "primary" | "secondary"; + }; + const Button = twc.button + .transientProps(["variant"]) + .attrs(({ type = "button", variant }) => { + expect(variant).toBe("primary"); + return { type }; + })`text-xl`; + render(