Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CopyButton): fix children type #4357

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chilly-seas-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ultraviolet/ui": patch
---

fix(CopyButton): fix children type
3 changes: 2 additions & 1 deletion packages/ui/src/components/CopyButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { ReactNode } from 'react'
import useClipboard from 'react-use-clipboard'
import { Button } from '../Button'

Expand All @@ -16,7 +17,7 @@ type CopyButtonProps = {
bordered?: boolean
className?: string
'data-testid'?: string
children?: string
children?: ReactNode
Copy link
Collaborator

@matthprost matthprost Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was done on purpose to be a string. Why do you need a react node ? We don't want the devs to be able to put anything else than a string to avoid having style suprises.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it because of translation?

}

/**
Expand Down
Loading