File tree 7 files changed +499
-0
lines changed
7 files changed +499
-0
lines changed Original file line number Diff line number Diff line change
1
+ npm-debug.log
2
+ yarn-error.log
3
+ /node_modules /
4
+ /.cache /
5
+ /dist /
6
+ /build /
7
+
8
+ /lib /
9
+ .merlin
10
+ .bsb.lock
11
+ * .mjs
Original file line number Diff line number Diff line change
1
+ <p align =" center " >
2
+ <a href =" #installation " >Installation</a > •
3
+ <a target =" _blank " href =" #examples " >Examples</a >
4
+ </p >
5
+
6
+ <br />
7
+ <br />
8
+
9
+ ## Installation
10
+
11
+ First you need to install ` react-bootstrap ` as their [ documentation] ( https://react-bootstrap.github.io/getting-started/introduction ) .
12
+
13
+ Basically you'll need to run these commands:
14
+
15
+ ``` sh
16
+ # with npm
17
+ npm add react-bootstrap@next bootstrap@5.1.0
18
+
19
+ # with yarn
20
+ yarn add react-bootstrap@next bootstrap@5.1.0
21
+ ```
22
+
23
+ Then, you'll need to import ` bootstrap ` styles into your app:
24
+
25
+ ``` js
26
+ // App.js
27
+
28
+ import " bootstrap/dist/css/bootstrap.min.css" ;
29
+ ```
30
+
31
+ Finally you can install this package running these commands:
32
+
33
+ ``` sh
34
+ # with npm
35
+ npm add -D @rescript/react-bootstrap
36
+
37
+ # with yarn
38
+ yarn add -D @rescript/react-bootstrap
39
+ ```
40
+
41
+ ## Examples
42
+
43
+ ### Basic Form
44
+
45
+ ``` rescript
46
+ module Form = ReactBootstrap.Form
47
+ module Button = ReactBootstrap.Button
48
+ module Container = ReactBootstrap.Container
49
+
50
+ @react.component
51
+ let make = () => {
52
+ <Container>
53
+ <Form>
54
+ <Form.Group>
55
+ <Form.Label> {`Email`->React.string} </Form.Label>
56
+ <Form.Control _type="email" />
57
+ </Form.Group>
58
+
59
+ <Form.Group>
60
+ <Form.Label> {`Senha`->React.string} </Form.Label>
61
+ <Form.Control _type="password" />
62
+ </Form.Group>
63
+
64
+ <Button size=#lg _type=#submit>
65
+ {`Acessar`->React.string}
66
+ </Button>
67
+ </Form>
68
+ </Container>
69
+ }
70
+ ```
Original file line number Diff line number Diff line change
1
+ {
2
+ "$schema" : " https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json" ,
3
+ "name" : " @rescript/react-bootstrap" ,
4
+ "version" : " 0.0.1" ,
5
+ "reason" : {
6
+ "react-jsx" : 3
7
+ },
8
+ "sources" : [
9
+ {
10
+ "dir" : " src" ,
11
+ "subdirs" : true
12
+ }
13
+ ],
14
+ "package-specs" : {
15
+ "module" : " es6" ,
16
+ "in-source" : true
17
+ },
18
+ "suffix" : " .mjs" ,
19
+ "bs-dependencies" : [" @rescript/react" ],
20
+ "warnings" : {
21
+ "error" : " +102"
22
+ },
23
+ "gentypeconfig" : {
24
+ "language" : " typed" ,
25
+ "shims" : []
26
+ }
27
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ description = "Rescript bindings for ReactBootstrap" ;
3
+
4
+ inputs = {
5
+ nixpkgs . url = "github:NixOS/nixpkgs/nixos-21.05" ;
6
+ flake-utils . url = "github:numtide/flake-utils" ;
7
+ } ;
8
+
9
+ outputs = { self , nixpkgs , flake-utils } :
10
+ flake-utils . lib . eachDefaultSystem ( system :
11
+ let
12
+ pkgs = nixpkgs . legacyPackages . x86_64-linux ;
13
+ yarnBuild = pkgs . mkYarnPackage {
14
+ name = "rescript-react-bootstrap" ;
15
+ version = "0.0.1" ;
16
+ src = ./. ;
17
+ packageJSON = ./package.json ;
18
+ yarnLock = ./yarn.lock ;
19
+
20
+ nativeBuildInputs = with pkgs ; [ nodejs-16_x python39 ] ;
21
+
22
+ # TODO: we need to build this package any way haha
23
+
24
+ meta = with pkgs . lib ; {
25
+ license = licenses . mit ;
26
+ maintainers = with maintainers ; [ matdsoupe ] ;
27
+ } ;
28
+ } ;
29
+ in {
30
+ devShell = pkgs . mkShell {
31
+ name = "kirby" ;
32
+ buildInputs = with pkgs ; with pkgs . nodePackages ; [
33
+ # pacotes pro ambiente de desenvolvimento
34
+ # dev packages
35
+ nodejs-16_x
36
+ yarn
37
+ eslint
38
+ prettier
39
+
40
+ # necessário para compilar o rescript/bs-platform (temporário)
41
+ # to build rescript/bs-platform (temporary)
42
+ python39
43
+
44
+ # pacotes da aplicação (veja package.json)
45
+ # app packages (See package.json)
46
+ yarnBuild
47
+ ] ;
48
+ shellHook = ''export PATH="./node_modules/.bin:$PATH"'' ;
49
+ } ;
50
+ } ) ;
51
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " @rescript/react-bootstrap" ,
3
+ "version" : " 0.0.1" ,
4
+ "description" : " Rescript bindings for ReactBootstrap" ,
5
+ "main" : " index.js" ,
6
+ "scripts" : {
7
+ "res:watch" : " rescript build -w" ,
8
+ "res:build" : " rescript build" ,
9
+ "res:clean" : " rescript clean" ,
10
+ "res:format" : " rescript format -all"
11
+ },
12
+ "keywords" : [
13
+ " react" ,
14
+ " rescript" ,
15
+ " rescript-bindings" ,
16
+ " rescript-react" ,
17
+ " bootstrap" ,
18
+ " ecosystem-react" ,
19
+ " react-component"
20
+ ],
21
+ "author" : " Matheus de Souza Pessanha <matheus_pessanha2001@outloook.com>" ,
22
+ "license" : " ISC" ,
23
+ "repository" : {
24
+ "type" : " git" ,
25
+ "url" : " https://github.com/rescriptbr/rescript-react-bootstrap"
26
+ },
27
+ "devDependencies" : {
28
+ "rescript" : " ^9.1.4" ,
29
+ "@rescript/react" : " ^0.10.3"
30
+ },
31
+ "peerDependencies" : {
32
+ "bootstrap" : " 5.1.0" ,
33
+ "react-bootstrap" : " ^2.0.0-beta.6"
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments