Skip to content
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

React-Bootstrap #6

Open
Wscats opened this issue Jun 14, 2017 · 0 comments
Open

React-Bootstrap #6

Wscats opened this issue Jun 14, 2017 · 0 comments

Comments

@Wscats
Copy link
Owner

Wscats commented Jun 14, 2017

React-bootstrap官方文档

安装

npm install --save react react-dom
npm install --save react-bootstrap

引入样式

在主页引入CSS样式

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap-theme.min.css">

使用组件

import Button from 'react-bootstrap/lib/Button';
//或者
import { Button } from 'react-bootstrap';//推荐这种

比如我需要使用按钮的这几个组件

//引入ButtonGroup和Button组件
import {ButtonGroup,Button} from 'react-bootstrap';
//使用ButtonGroup和Button组件
const About = () => (
  <div>
    <h2>关于</h2>
    <ButtonGroup vertical block>
      <Button>Full width button</Button>
      <Button>Full width button</Button>
    </ButtonGroup>
  </div>
)

组件文档

查看其它组件

@Wscats Wscats changed the title React-bootstrap React-Bootstrap Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant