Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Update 'Themeable components' docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Aug 5, 2020
1 parent 1467e4e commit 480f2ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions packages/website/src/docs/styling-components.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
---
breakpoint: tablet
title: Themeable components
title: Themeable & styled components
path: /styling-components/
---

# Themeable components
# Themeable & styled components

Bumbag comes with an `applyTheme` function which allows you to create components that have a customized theme attached to them. This allows you to **style components**, as well as set **default props** to them.
Bumbag has two methods of styling components, via:

- **[Themeable components](#creating-a-basic-themeable-component) (recommended)**: Allowing you to create components that have a customized theme/style attached to them. This allows you to **style components**, as well as set **default props**, **variants** and **modes** to them.
- **[Styled components](#theming-external-components)**: Allowing you to create a standalone styled component.

**Note: Themeable components are not supported with third-party components that do not belong to Bumbag. [You can use styled components instead](#theming-external-components).**

## Creating a basic themeable component

Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/layout/DocsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default function Docs(props: Props) {
<React.Fragment>
<SEO title={pageContext.frontmatter?.seoTitle || pageContext.frontmatter?.title} />
<bumbag.PageWithHeader sticky header={<Header />}>
<bumbag.PageWithSidebar sidebar={<Sidebar path={path} />} sidebarPlacement="left">
<bumbag.PageWithSidebar sidebar={<Sidebar path={path} />} sidebarPlacement="left" sidebarWidth="270px">
<TableOfContents
breakpoint={pageContext.frontmatter.breakpoint || 'tablet'}
isFluid={pageContext.frontmatter.isFluid}
Expand Down

0 comments on commit 480f2ce

Please sign in to comment.