generated from timelessco/next-ts-app-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(components): 🎨 update all components used
- Loading branch information
1 parent
debf459
commit a642987
Showing
7 changed files
with
78 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Button } from "@renderlesskit/react-tailwind"; | ||
import { useClipboard } from "@chakra-ui/hooks"; | ||
|
||
export type CopyButtonProps = { | ||
code: string; | ||
}; | ||
|
||
export const CopyButton: React.FC<CopyButtonProps> = ({ code }) => { | ||
const { hasCopied, onCopy } = useClipboard(code); | ||
|
||
return ( | ||
<span className="absolute right-0 -top-2 -translate-x-2 translate-y-4 transform"> | ||
<Button size="sm" onClick={onCopy}> | ||
{hasCopied ? "Copied!" : "Copy"} | ||
</Button> | ||
</span> | ||
); | ||
}; | ||
|
||
export default CopyButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a642987
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: