D
D
DrunkMaster2017-02-25 23:47:00
Sass
DrunkMaster, 2017-02-25 23:47:00

Installing bootstrap via npm?

Installed as written https://www.npmjs.com/package/bootstrap
npm install [email protected]
Bootstrap folder appeared in node_modules folder
And now how to start working with it? Where is the sass-file preparation for compiling into bootstrap.css styles, where is the simplest html-template like jumbotron?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Titov, 2017-02-26
@titov_andrei

Usage

Simply import your bootstrap css modules


import { alerts, buttons, jumbotron } from 'pure-css'

Then use it for styling your elements.

<div styleName='jumbotron'>
  <h1>Hello, world!</h1>
  <a styleName='btn btn-primary btn-lg'>Learn more</a>
  <div styleName='alert alert-info'>...</div>
</div>
Example

Check out the full working example here

import React from 'react'
import CSSModules from 'react-css-modules'
 
import { jumbotron } from 'bootstrap-css'
let styles = {}
Object.assign(styles, jumbotron)
 
class Test extends React.Component {
    render () {
        return (
        <div styleName='jumbotron'>
        	<h1>Hello, world!</h1>
        </div>
        );
    }
}
 
export default CSSModules(Test, styles);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question