Skip to content

Commit

Permalink
docs(Storybook): add Changelog page (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgonzalezr authored Jul 29, 2024
1 parent a165fd0 commit f06be3f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ packages/beeq/.storybook/assets/css/stories.css
packages/beeq/vite.config.*.timestamp-*
packages/beeq/custom-elements.json
packages/beeq/src/components/icon/svg/**
packages/beeq/src/_storybook/CHANGELOG.md
packages/beeq-angular/**/directives
packages/beeq-react/src/react-component-lib
packages/beeq-react/src/components.ts
Expand Down
4 changes: 4 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@
"lint": {
"cache": true
},
"prepare-storybook": {
"cache": true
},
"storybook-build": {
"dependsOn": [
{ "target": "prepare-storybook", "projects": "beeq" },
{ "target": "build", "projects": "beeq" },
{ "target": "storybook-build-css", "projects": "beeq" }
],
Expand Down
19 changes: 17 additions & 2 deletions packages/beeq/.storybook/assets/css/preview.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,24 @@
font-size: var(--bq-font-size--xxl2);
}

.sbdocs-content h2 {
font-size: var(--bq-font-size--xxl);
.sbdocs-content h2,
.sbdocs-content h2 a {
border-bottom: none;
font-size: var(--bq-font-size--xxl);
}

.sbdocs-content h2 a {
font-weight: var(--bq-font-weight--bold)
}

.sbdocs-content h2,
.sbdocs-content h3 {
display: flex;
align-items: center;
}

.sbdocs-content h3 {
font-weight: var(--bq-font-weight--semibold);
}

.docblock-typeset {
Expand Down
2 changes: 1 addition & 1 deletion packages/beeq/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const preview: Preview = {
},
options: {
storySort: {
order: ['Welcome', 'Foundation', 'Components'],
order: ['Welcome', "What's new", 'Foundation', 'Components'],
},
},
},
Expand Down
7 changes: 7 additions & 0 deletions packages/beeq/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
},
"storybook-start": {
"executor": "@nx/storybook:storybook",
"dependsOn": [{ "target": "prepare-storybook" }],
"options": {
"loglevel": "silly",
"configDir": "packages/beeq/.storybook",
Expand Down Expand Up @@ -170,6 +171,12 @@
"configFile": "packages/beeq/.stylelintrc.json"
}
},
"prepare-storybook": {
"executor": "nx:run-commands",
"options": {
"command": "cp CHANGELOG.md {projectRoot}/src/_storybook"
}
},
"prepublish": {
"executor": "nx:run-commands",
"outputs": ["{options.outputPath}"],
Expand Down
10 changes: 10 additions & 0 deletions packages/beeq/src/_storybook/changelog.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Markdown, Meta } from '@storybook/blocks';
import Changelog from './CHANGELOG.md?raw';

<Meta title="What's new" />

<div className="bq-doc__wrapper">
<div className="bq-doc__container" >
<Markdown>{Changelog}</Markdown>
</div>
</div>

0 comments on commit f06be3f

Please sign in to comment.