Skip to content

Commit

Permalink
docs(storybook theme): style subheadings with custom renderLabel prop
Browse files Browse the repository at this point in the history
  • Loading branch information
JakePitman committed Mar 7, 2023
1 parent 22ab2ec commit f0f39ad
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions storybook/manager.ts → storybook/manager.tsx
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>
),
},
})

0 comments on commit f0f39ad

Please sign in to comment.