mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
519 B
519 B
import React from 'react';
import { AddonPanel } from '@storybook/components';
import { useStorybookState } from '@storybook/manager-api';
export const Panel = () => {
const state = useStorybookState();
return (
<AddonPanel {...props}>
{state.viewMode !== 'docs' ? (
<h2>Do something with the documentation</h2>
) : (
<h2>Show the panel when viewing the story</h2>
)}
</AddonPanel>
);
};