1
0
mirror of synced 2025-12-21 19:06:49 -05:00
Files
docs/components/landing/LandingSection.tsx
Mike Surowiec e8b7d3b9fc Product landing page react (pt 4) (#19336)
* start SidebarNav, enable dark mode

* wip: sidebarnav, fix primer components theme rendering

* feat: ProductSiteTree, useFeatureFlag

* feat: add new product site tree (untested)

* wire up HomepageVersionPicker, run lint

* fix: remove re-render logic, fix homepage version picker to be natural width

* fix: support css + primer/components color modes

* fix: rename categoryId -> productId

* feat: ProductSiteTree and AllArticlesProduct

* fix: cleanup warnings

* fix: use next links on ProductSiteTreeNew

* fix: use next Link on AllArticlesProduct

* fix: add tooltip to ScrollButton, remove stylesheet dependency

* feat: ProductArticlesList component

* fix: convert color_mode value from cookie when necessary

* remove comments

* replace liquid with jsx

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-05-19 02:49:51 +00:00

21 lines
518 B
TypeScript

import cx from 'classnames'
type Props = {
title?: React.ReactNode
sectionLink?: string
children?: React.ReactNode
className?: string
}
export const LandingSection = ({ title, children, className, sectionLink }: Props) => {
return (
<div className={cx('container-xl px-3 px-md-6', className)} id={sectionLink}>
{title && (
<h2 className="font-mktg h1 mb-4">
{sectionLink ? <a href={`#${sectionLink}`}>{title}</a> : title}
</h2>
)}
{children}
</div>
)
}