nainštalovať reagovať bootstrap
npm install react-bootstrap bootstrap
reagovať bootstrap
// Install react-bootstrap and bootstrap module
npm i react-bootstrap bootstrap
// Import bootstrap so that the styles work
import 'bootstrap/dist/css/bootstrap.min.css';
// Use react-bootstrap
import { Button } from 'react-bootstrap'
{ // Some Component
<Button /> // Displays a nice blue button :)
}
reagovať bootstrap
{/* The following line can be included in your src/index.js or App.js file*/}
import 'bootstrap/dist/css/bootstrap.min.css';
reagovať bootstrap
*/ npm install react-bootstrap bootstrap
import 'bootstrap/dist/css/bootstrap.min.css';
import Button from 'react-bootstrap/Button';
// or less ideally
import { Button } from 'react-bootstrap';
<>
<Button variant="primary">Primary</Button>{' '}
<Button variant="secondary">Secondary</Button>{' '}
<Button variant="success">Success</Button>{' '}
<Button variant="warning">Warning</Button>{' '}
<Button variant="danger">Danger</Button> <Button variant="info">Info</Button>{' '}
<Button variant="light">Light</Button> <Button variant="dark">Dark</Button>{' '}
<Button variant="link">Link</Button>
</>