import * as React from "react"; import type { Config, GlobalState, GlobalAction } from "../../shared/types"; import { Button as ThemeButton } from "./addons/theme"; import { Button as ControlButton } from "./addons/control"; import { Button as ModeButton } from "./addons/mode"; import { Button as ActionButton } from "./addons/action"; import { Button as RtlButton } from "./addons/rtl"; import { Button as SourceButton } from "./addons/source"; import { Button as LadleButton } from "./addons/ladle"; import { Button as A11yButton } from "./addons/a11y"; import { Button as WidthButton } from "./addons/width"; import config from "./get-config"; type AddonNames = keyof Config["addons"]; const AddonPanel = ({ globalState, dispatch, }: { globalState: GlobalState; dispatch: React.Dispatch; }) => { if ( Object.keys(config.addons).every( (addonName) => config.addons[addonName as AddonNames].enabled === false, ) ) { return null; } return (
); }; export default AddonPanel;