-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalize the adding bootstrap documentation #5631
Conversation
There's also this PR that adds a section on installing plain bootstrap, in addition to reactstrap: #5565 |
We definitely don't want to advocate jQuery usage. I'd be OK with advocating something like "Bootstrap for styling only", where you use just CSS and no JS. |
I think (at least it was my intention that) the copy I've added above here covers the "don't use jquery" aspect, with "here are the two main alternatives to that" but not trying to recommend one particular solution. w/d/t @Timer ? |
@jquense I actually like yours more than the reactstrap, that's because you have included an guide on how to theme which I think is really important using component library like react + a lot people are base their design system on bootstrap so the ability to easily customize the components is a win for me. Example
What I don't like though is that your readme.md kinda looks messy to me, and I think it has to do with you maintaining two different bootstrap versions 3 and 4. I made an issue on this check the react-bootstrap/react-bootstrap#3359 |
anything I can do here? |
docusaurus/docs/adding-bootstrap.md
Outdated
@@ -3,36 +3,28 @@ id: adding-bootstrap | |||
title: Adding Bootstrap | |||
--- | |||
|
|||
You don’t have to use [reactstrap](https://reactstrap.github.io/) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps: | |||
While you don’t have to use any specific library to integrate Bootstrap with React apps, it's often easier than trying to wrap the Bootstrap jQuery plugins. [React Bootstrap](https://react-bootstrap.netlify.com/) is the most popular option, that strives for complete parity with bootstrap. [reactstrap](https://reactstrap.github.io/) is also a good choice for projects looking for smaller builds at the expense of less features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The end of this sentence doesn't sound right. expense of less featues
sounds kind of like a double negative. Maybe something like at the expense of some features
?
docusaurus/docs/adding-bootstrap.md
Outdated
``` | ||
|
||
Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your `src/index.js` file: | ||
|
||
```js | ||
import 'bootstrap/dist/css/bootstrap.css'; | ||
import 'bootstrap/dist/css/bootstrap.css' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our default template uses semicolons.
docusaurus/docs/adding-bootstrap.md
Outdated
@@ -55,5 +47,5 @@ $body-bg: #000; | |||
Finally, import the newly created `.scss` file instead of the default Bootstrap `.css` in the beginning of your `src/index.js` file, for example: | |||
|
|||
```javascript | |||
import './custom.scss'; | |||
import './custom.scss' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add semicolon back.
I think this is a good change. However, I agree with @Timer that it might be good to mention that just installing the bootstrap CSS is a valid option for theming only with no JS features (like dropdowns, etc). |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Thanks! |
Picking a particular react bootstrap library feels like too strong of an opinion for supplementary CRA docs. I trimmed it down to point out the two most popular options and remove library specific documentation to focus on the bits that are more CRA specific, e.g. using sass files.