File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
apps/addon-catalog/components/addon Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,11 @@ import { StorybookIcon } from '@repo/ui';
14
14
import { type Addon } from '../../types' ;
15
15
16
16
export function AddonHero ( { addon } : { addon : Addon } ) {
17
+ const installCommand = `npm install -D ${ addon . name ?? '' } ` ;
17
18
const [ state , setState ] = useState ( false ) ;
18
19
19
20
const onClick = ( ) => {
20
- copy ( `npx install ${ addon . name ?? '' } ` ) ;
21
+ copy ( installCommand ) ;
21
22
setState ( true ) ;
22
23
setTimeout ( ( ) => {
23
24
setState ( false ) ;
@@ -49,7 +50,7 @@ export function AddonHero({ addon }: { addon: Addon }) {
49
50
onClick = { onClick }
50
51
type = "button"
51
52
>
52
- npm install { addon . name } < CopyIcon />
53
+ { installCommand } < CopyIcon />
53
54
< AnimatePresence >
54
55
{ state ? (
55
56
< motion . div
You can’t perform that action at this time.
0 commit comments