-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added script copy button (#342)
* feat: added script copy button * feat: added dependecy, removed the dock change * fix: update scripts * fix: update sidebar * fix: update docs * fix: update * fix: update --------- Co-authored-by: Dillion Verma <hello@dillion.io>
- Loading branch information
1 parent
bd8ab82
commit b7ef970
Showing
14 changed files
with
521 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: Script Copy Button | ||
date: 2023-11-18 | ||
description: Copy code to clipboard | ||
author: dillionverma | ||
published: true | ||
--- | ||
|
||
<ComponentPreview name="script-copy-btn-demo" /> | ||
|
||
## Installation | ||
|
||
<Tabs defaultValue="cli"> | ||
|
||
<TabsList> | ||
<TabsTrigger value="cli">CLI</TabsTrigger> | ||
<TabsTrigger value="manual">Manual</TabsTrigger> | ||
</TabsList> | ||
<TabsContent value="cli"> | ||
|
||
```bash | ||
npx shadcn@latest add "https://magicui.design/r/script-copy-btn" | ||
``` | ||
|
||
</TabsContent> | ||
|
||
<TabsContent value="manual"> | ||
|
||
<Steps> | ||
|
||
<Step>Copy and paste the following code into your project.</Step> | ||
|
||
<ComponentSource name="script-copy-btn" /> | ||
|
||
</Steps> | ||
|
||
</TabsContent> | ||
|
||
</Tabs> | ||
|
||
## Props | ||
|
||
| Prop | Type | Description | Default | | ||
| -------------------------- | ------------------------ | ----------------------------------------------------------- | ------- | | ||
| className | string | The class name to be applied to the component | | | ||
| showMultiplePackageOptions | boolean | Whether to show options for multiple package managers | true | | ||
| codeLanguage | string | The language of the code snippet (e.g., "shell") | | | ||
| lightTheme | string | The theme to use for light mode | | | ||
| darkTheme | string | The theme to use for dark mode | | | ||
| commandMap | Record \<string, string> | A map of package manager names to their respective commands | | |
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
Oops, something went wrong.