Skip to content

Commit

Permalink
Fix Button and IconButton RSC compatibility (#2982)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer authored Mar 7, 2025
1 parent e4cdca5 commit 908de8b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-singers-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sumup-oss/circuit-ui": patch
---

Fixed the Button and IconButton component's compatibility with React Server Components (RSC) by adding a missing `'use client'` directive.
2 changes: 2 additions & 0 deletions packages/circuit-ui/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* limitations under the License.
*/

'use client';

import type {
ForwardRefExoticComponent,
PropsWithoutRef,
Expand Down
2 changes: 2 additions & 0 deletions packages/circuit-ui/components/Button/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* limitations under the License.
*/

'use client';

import {
Children,
cloneElement,
Expand Down

0 comments on commit 908de8b

Please sign in to comment.