Skip to content

Commit

Permalink
Merge pull request #29225 from grantwforsythe/next
Browse files Browse the repository at this point in the history
UI: Add Yarn to About Section
  • Loading branch information
kasperpeulen authored Nov 11, 2024
2 parents f317144 + 75289ae commit b651578
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions code/core/src/manager/components/upgrade/UpgradeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface UpgradeBlockProps {

export const UpgradeBlock: FC<UpgradeBlockProps> = ({ onNavigateToWhatsNew }) => {
const api = useStorybookApi();
const [activeTab, setActiveTab] = useState<'npm' | 'pnpm'>('npm');
const [activeTab, setActiveTab] = useState<'npm' | 'yarn' | 'pnpm'>('npm');

return (
<Container>
Expand All @@ -24,12 +24,17 @@ export const UpgradeBlock: FC<UpgradeBlockProps> = ({ onNavigateToWhatsNew }) =>
<ButtonTab active={activeTab === 'npm'} onClick={() => setActiveTab('npm')}>
npm
</ButtonTab>
<ButtonTab active={activeTab === 'yarn'} onClick={() => setActiveTab('yarn')}>
yarn
</ButtonTab>
<ButtonTab active={activeTab === 'pnpm'} onClick={() => setActiveTab('pnpm')}>
pnpm
</ButtonTab>
</Tabs>
<Code>
{activeTab === 'npm' ? 'npx storybook@latest upgrade' : 'pnpm dlx storybook@latest upgrade'}
{activeTab === 'npm'
? 'npx storybook@latest upgrade'
: `${activeTab} dlx storybook@latest upgrade`}
</Code>
{onNavigateToWhatsNew && (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
Expand Down

0 comments on commit b651578

Please sign in to comment.