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

Commit

Permalink
Update bootstrap recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Lloyd committed Mar 2, 2023
1 parent 4e3e613 commit 7fc78e3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/getting-started/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,30 @@ module.exports = {
};
```

**NOTE:** If you want to use Bootstrap's `.scss` files, add the styling addon like so:

```js
module.exports = {
stories: [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: [
"@storybook/addon-essentials",
{
name: "@storybook/addon-styling",
options: {
sass: {
// Require your sass preprocessor here
// I recommend dart sass (yarn add -D sass)
implementation: require("sass"),
},
},
},
],
};
```

## 🥾 Import Bootstrap

To give your stories access to Bootstrap's styles and JavaScript, import them into your `.storybook/preview.js` file.
Expand All @@ -60,6 +84,8 @@ export const parameters = {
};
```

If you're using `scss` import your `index.scss` file instead of Bootstrap's `bootstrap.min.css` file.

## 🎨 Provide your theme(s)

Bootstrap now supports light and dark color modes out of the box as well as the ability to make your own custom modes. These modes can be activated by setting a `data-bs-theme` attribute on a parent element.
Expand Down

0 comments on commit 7fc78e3

Please sign in to comment.