-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1798 from intuit/default-label-docs
update docs to always have latest default labels
- Loading branch information
Showing
4 changed files
with
46 additions
and
54 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { igniteComponents } from "next-ignite"; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import { defaultLabels } from "@auto-it/core/dist/semver"; | ||
import Highlight, { defaultProps } from "prism-react-renderer"; | ||
|
||
/** Render the current default labels in a details element */ | ||
export const DefaultLabelRenderer = () => ( | ||
<details> | ||
<summary>Click here to see the default label configuration</summary> | ||
|
||
<Highlight | ||
Prism={defaultProps.Prism} | ||
code={JSON.stringify(defaultLabels, null, 2)} | ||
language="json" | ||
> | ||
{({ className, style, tokens, getLineProps, getTokenProps }) => ( | ||
<igniteComponents.pre className={className} style={style}> | ||
<igniteComponents.code className="language-json"> | ||
{tokens.map((line, i) => ( | ||
<div {...getLineProps({ line, key: i })}> | ||
{line.map((token, key) => ( | ||
<span {...getTokenProps({ token, key })} /> | ||
))} | ||
</div> | ||
))} | ||
</igniteComponents.code> | ||
</igniteComponents.pre> | ||
)} | ||
</Highlight> | ||
</details> | ||
); |
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
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
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