Skip to content

Commit

Permalink
docs: disable controlled example source code
Browse files Browse the repository at this point in the history
  • Loading branch information
petermakowski committed Oct 17, 2023
1 parent 3f38d5a commit 288c5cc
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
10 changes: 1 addition & 9 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import { addons } from "@storybook/manager-api";
import { create } from "@storybook/theming/create";
import { name } from "../package.json";

const theme = create({
base: "light",
brandTitle: name,
brandImage: "https://assets.ubuntu.com/v1/142ae045-Canonical%20MAAS.png",
brandTarget: "_self",
});
import { theme } from "./theme";

addons.setConfig({
theme,
Expand Down
1 change: 1 addition & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type { import('@storybook/react').Preview } */
import "./preview.scss";
import DocumentationTemplate from "./DocumentationTemplate.mdx";
import { theme } from "./theme";

const preview = {
parameters: {
Expand Down
9 changes: 9 additions & 0 deletions .storybook/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { create } from "@storybook/theming/create";
import { name } from "../package.json";

export const theme = create({
base: "light",
brandTitle: name,
brandImage: "https://assets.ubuntu.com/v1/142ae045-Canonical%20MAAS.png",
brandTarget: "_self",
});
11 changes: 10 additions & 1 deletion src/lib/components/NestedFormGroup/NestedFormGroup.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,13 @@ const meta: Meta<typeof NestedFormGroup> = {
export default meta;

export const Example = { args: { "aria-hidden": false } };
export const ControlledExample = ControlledTemplate;
export const ControlledExample = {
render: ControlledTemplate,
parameters: {
docs: {
source: {
code: null,
},
},
},
};

0 comments on commit 288c5cc

Please sign in to comment.