Skip to content

Commit d757190

Browse files
authored
Merge pull request #225 from kkuegler/main
2 parents 1442801 + c40240b commit d757190

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/addon-catalog/components/addon/addon-hero.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ import { StorybookIcon } from '@repo/ui';
1414
import { type Addon } from '../../types';
1515

1616
export function AddonHero({ addon }: { addon: Addon }) {
17+
const installCommand = `npm install -D ${addon.name ?? ''}`;
1718
const [state, setState] = useState(false);
1819

1920
const onClick = () => {
20-
copy(`npx install ${addon.name ?? ''}`);
21+
copy(installCommand);
2122
setState(true);
2223
setTimeout(() => {
2324
setState(false);
@@ -49,7 +50,7 @@ export function AddonHero({ addon }: { addon: Addon }) {
4950
onClick={onClick}
5051
type="button"
5152
>
52-
npm install {addon.name} <CopyIcon />
53+
{installCommand} <CopyIcon />
5354
<AnimatePresence>
5455
{state ? (
5556
<motion.div

0 commit comments

Comments
 (0)