Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1009 Bytes

File metadata and controls

36 lines (27 loc) · 1009 Bytes

react-bootstrap-typescript-definitions

Typescript definitions for React Bootstrap

which may come in handy since jsx for typescript is not an option (yet)

is depending on react.d.ts from the DefinitlyTyped repo

just import react-bootstrap.min.js in your project or require('react-bootstrap') and use

     /// <reference path="path/to/react-bootstrap.d.ts" />
    declare var ReactBootstrap:ReactBootstrap;

and your editor should recognise and autocomplete things like:

ReactBootstrap.ButtonToolbar({},
    ReactBootstrap.ButtonGroup({},
        ReactBootstrap.Button({},
            ReactBoostrap.Glyphicon({glyph:'align-left'})
        ),
        ReactBootstrap.Button({},
            ReactBoostrap.Glyphicon({glyph:'align-center'})
        ),
        ReactBootstrap.Button({},
            ReactBoostrap.Glyphicon({glyph:'align-right'})
        )
    )
);