-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(storybook theme): style subheadings with custom renderLabel prop
- Loading branch information
1 parent
22ab2ec
commit f0f39ad
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
// This file is used by storybook to register installed addons. | ||
// See: https://storybook.js.org/docs/addons/using-addons/ | ||
import React from "react" | ||
import { addons } from "@storybook/addons" | ||
import { defaultTheme } from "@kaizen/design-tokens" | ||
import KaizenTheme from "./theme" | ||
|
||
const colors = defaultTheme.color | ||
|
||
addons.setConfig({ | ||
theme: KaizenTheme, | ||
analyticsGTM: { | ||
gtmId: "GTM-KS4VWLT", | ||
}, | ||
sidebar: { | ||
renderLabel: item => ( | ||
<div style={item.type === "root" ? { color: colors.purple["800"] } : {}}> | ||
{item.name} | ||
</div> | ||
), | ||
}, | ||
}) |