Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Change prop type of sidebarTitle #43

Merged
merged 7 commits into from
Aug 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Master

- Change the `sidebarTitle` prop type in the `PageLayout` component from string to string or node. ([#43](https://github.com/mapbox/dr-ui/pull/43))
- Add `lightText` prop for styling the `ProductMenu` popover trigger on dark backgrounds. ([#52](https://github.com/mapbox/dr-ui/pull/52))
- Update Mapbox Studio link in product menu items data file from /help/studio-manual/ to /studio-manual/. ([#50](https://github.com/mapbox/dr-ui/pull/50))
- Add the option to make an item active in `SectionedNavigtion`. Note: This should be used to indicate which example you're currently viewing when displaying `SectionedNavigation` on individual examples pages. ([#45](https://github.com/mapbox/dr-ui/pull/45))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ testCases.commonUseCase = {
description: 'Common use case',
component: PageLayout,
props: {
sidebarTitle: <div className="ml36">Section title</div>,
sidebarContent: (
<NavigationAccordion
currentPath="page-one"
Expand All @@ -33,6 +34,7 @@ testCases.commonUseCase = {
}
]
}}
onDropdownChange={() => {}}
/>
),
children: (
Expand Down
2 changes: 1 addition & 1 deletion src/components/page-layout/page-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class PageLayout extends React.Component {

PageLayout.propTypes = {
sidebarContent: PropTypes.node.isRequired,
sidebarTitle: PropTypes.string,
sidebarTitle: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
sidebarTheme: PropTypes.string,
sidebarContentStickyTop: PropTypes.number.isRequired,
sidebarContentStickyTopNarrow: PropTypes.number.isRequired,
Expand Down