I am trying to apply margins and paddings with React-Bootstrap as props.
I passed the docs through but haven\'t found any mention adding padding or margin in there as it
First include bootstrap CSS in your src/index.js
or App.js
import 'bootstrap/dist/css/bootstrap.min.css';
Then you can style your component by passing desired bootstrap CSS class name as className
prop in React, for example:
import React from "react"
import Container from "react-bootstrap/Container";
function MyComponent() {
return (
);
}
export default MyComponent
Above code will add p-0
CSS class to Container
.
Reference
React - How do I add CSS classes to components?
React-Bootstrap - Stylesheets