Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Nicer Table of Contents component
Damian Legawiec8a9ff6646898
diff --git a/guides/src/components/Toc.js b/guides/src/components/Toc.jsindex 35e0d48e5f..ef927f8df7 100644--- a/guides/src/components/Toc.js+++ b/guides/src/components/Toc.js@@ -9,10 +9,13 @@ import kebabCase from 'lodash.kebabcase'*/const styleToc = css`- top: 140px;- max-height: calc(100% - 140px);+ top: 100px;+ max-height: calc(100% - 120px);overflow-y: auto;overflow-x: hidden;+ border-radius: 6px;+ padding: 0.5em 1em;+ background: #f4f4f4;@media screen and (min-width: 60em) {& + article {@@ -35,7 +38,7 @@ const getMarginDepth = depth => ([1, 2].includes(depth) ? 0 : depth)const Toc = ({ headings }) => (<aside className="ml3 mw5 fixed dn db-l overflow-auto right-1" css={styleToc}>- <h4 className="ttu mt0 mb3">Table Of Contents</h4>+ <h3 className="mt0 mb1">Table Of Contents</h3><nav>{headings.map(heading => {