Skip to content

Commit 908de8b

Browse files
authored
Fix Button and IconButton RSC compatibility (#2982)
1 parent e4cdca5 commit 908de8b

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.changeset/happy-singers-judge.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@sumup-oss/circuit-ui": patch
3+
---
4+
5+
Fixed the Button and IconButton component's compatibility with React Server Components (RSC) by adding a missing `'use client'` directive.

packages/circuit-ui/components/Button/Button.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* limitations under the License.
1414
*/
1515

16+
'use client';
17+
1618
import type {
1719
ForwardRefExoticComponent,
1820
PropsWithoutRef,

packages/circuit-ui/components/Button/IconButton.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* limitations under the License.
1414
*/
1515

16+
'use client';
17+
1618
import {
1719
Children,
1820
cloneElement,

0 commit comments

Comments
 (0)