diff --git a/.storybook/preview.js b/.storybook/preview.js index a18e1911..d1797896 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -73,6 +73,7 @@ export const parameters = { 'Atoms', 'Molecules', 'Organisms', + 'Features', 'Releases', ], }, diff --git a/.storybook/storybook.css b/.storybook/storybook.css index 3857df1d..ea514eb2 100644 --- a/.storybook/storybook.css +++ b/.storybook/storybook.css @@ -5,9 +5,22 @@ font-size: var(--fs-text-size-5); } -.sbdocs-content > header .sbdocs-p { margin: var(--fs-spacing-1) 0 0; } +.sbdocs.sbdocs-p code { + font-size: var(--fs-text-size-legend); +} + +.sbdocs.sbdocs-p a { + text-decoration: underline; +} -.sbdocs.sbdocs-p { font-size: var(--fs-text-size-body); } +.sbdocs-content > header .sbdocs-p { + margin: var(--fs-spacing-1) 0 0; +} + +.sbdocs.sbdocs-p, +.sbdocs.sbdocs-li { + font-size: var(--fs-text-size-body); +} .sbdocs.sbdocs-h2 { margin: 0 0 var(--fs-spacing-1); @@ -21,13 +34,15 @@ h3.sbdocs.sbdocs-h3 { font-size: var(--fs-text-size-lead); } -.sbdocs.sbdocs-h2 + .sbdocs.sbdocs-h3 { margin-top: var(--fs-spacing-4); } +.sbdocs.sbdocs-h2 + .sbdocs.sbdocs-h3 { + margin-top: var(--fs-spacing-4); +} /* Header */ .sbdocs-content > header { padding: var(--fs-spacing-4) var(--fs-spacing-5); - margin-bottom: var(--fs-spacing-4); + margin-bottom: var(--fs-spacing-6); color: var(--fs-color-text-inverse); background-color: var(--fs-color-main-0); border-radius: var(--fs-border-radius); @@ -100,21 +115,27 @@ h3.sbdocs.sbdocs-h3 { margin-top: var(--fs-spacing-4); } -.sbdocs-best-practices-rule:not(:first-of-type) { margin-top: var(--fs-spacing-6); } +.sbdocs-best-practices-rule:not(:first-of-type) { + margin-top: var(--fs-spacing-6); +} .sbdocs-best-practices-rule > article { flex-basis: 100%; width: 0; } -.sbdocs-best-practices-text { margin-top: var(--fs-spacing-3); } +.sbdocs-best-practices-text { + margin-top: var(--fs-spacing-3); +} .sbdocs-best-practices-text h3.sbdocs.sbdocs-h3 { margin: 0 0 var(--fs-spacing-1) 0; font-weight: var(--fs-text-weight-bold); } -.sbdocs-best-practices-text h3 span { margin-right: var(--fs-spacing-0); } +.sbdocs-best-practices-text h3 span { + margin-right: var(--fs-spacing-0); +} .sbdocs-best-practices-text p { padding-right: var(--fs-spacing-4); @@ -135,7 +156,9 @@ h3.sbdocs.sbdocs-h3 { max-width: 90%; } -.sbdocs-best-practices-rule > article div > [data-fs-alert] { width: 90%; } +.sbdocs-best-practices-rule > article div > [data-fs-alert] { + width: 90%; +} /* Section */ @@ -150,6 +173,10 @@ h3.sbdocs.sbdocs-h3 { width: 0; } +.no-code .docblock-code-toggle { + display: none; +} + .sbdocs-section-text { margin-top: var(--fs-spacing-3); } @@ -174,6 +201,69 @@ h3.sbdocs.sbdocs-h3 { border-radius: var(--fs-border-radius); } +/* List */ + +.sbdocs-list { + display: flex; + justify-content: center; +} + +.sbdocs-list .sbdocs-ul { + display: flex; + flex-direction: column; + row-gap: var(--fs-spacing-4); + justify-content: center; + width: 100%; + padding: 0; + margin-top: var(--fs-spacing-4); +} + +.sbdocs-list .sbdocs-li { + display: flex; + flex-basis: 100%; + column-gap: var(--fs-spacing-4); + align-items: center; + justify-content: space-between; +} + +.sbdocs-list .sbdocs-li > * { + flex-shrink: 0; + width: 48%; +} + +.sbdocs-list .sbdocs-li > div { + box-sizing: border-box; + display: flex; + align-items: center; + justify-content: center; + height: 100%; + min-height: 140px; + padding: var(--fs-spacing-3); + background-color: var(--fs-color-neutral-1); + border-radius: var(--fs-border-radius); +} + +.sbdocs-list .sbdocs-div > img { + max-height: 100%; + border-radius: var(--fs-border-radius); +} + +.sbdocs-list-text h3.sbdocs.sbdocs-h3 { + margin: 0 0 var(--fs-spacing-1) 0; + font-weight: var(--fs-text-weight-bold); +} + +.sbdocs-list-text p { + padding-right: var(--fs-spacing-4); + margin: 0; + line-height: 1.6; +} + +.sbdocs-list .sbdocs-list-text [data-fs-button] { + margin-top: var(--fs-spacing-1); + margin-left: calc(-1 * var(--fs-spacing-1)); +} + /* Callout */ .sbdocs-callout { diff --git a/CHANGELOG.md b/CHANGELOG.md index e32d59c8..94ddad67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Creates Doc page for `Regionalization` Feature ([#110](https://github.com/vtex-sites/nextjs.store/pull/110)) +- Applies new local tokens to `RegionalizationBar` ([#104](https://github.com/vtex-sites/nextjs.store/pull/104)) - Applies new local tokens to `Modal` and `RegionalizationModal` ([#128](https://github.com/vtex-sites/nextjs.store/pull/128)) - PriceRange component ([#124](https://github.com/vtex-sites/nextjs.store/pull/124)) - PriceRange component to PLP and StoryBook ([#121](https://github.com/vtex-sites/nextjs.store/pull/121)) diff --git a/src/components/common/Navbar/Navbar.tsx b/src/components/common/Navbar/Navbar.tsx index 179bfa3f..ec817a56 100644 --- a/src/components/common/Navbar/Navbar.tsx +++ b/src/components/common/Navbar/Navbar.tsx @@ -45,10 +45,8 @@ const collections = [ function NavLinks({ onClickLink }: NavLinksProps) { return (