Skip to content

Commit

Permalink
fix navbar + install reactstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
S1B41 committed Nov 13, 2020
1 parent c0fbbf0 commit 7d8b487
Show file tree
Hide file tree
Showing 4 changed files with 299 additions and 14 deletions.
21 changes: 9 additions & 12 deletions imports/ui/inputBox.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { Component } from 'react';
import TextareaAutosize from 'react-autosize-textarea';
import React, { Component } from "react";
import TextareaAutosize from "react-autosize-textarea";
import { Button } from "reactstrap";

import Notes from '/imports/collections/notes';
import Notes from "/imports/collections/notes";

// export default (props) => {
export default class InputBox extends Component {

constructor() {
super();
this.state = {};
Expand All @@ -16,7 +16,7 @@ export default class InputBox extends Component {
return;
}
Notes.insert({ createdAt: new Date(), value: this.state.value });
this.setState({ value: '' });
this.setState({ value: "" });
}

render() {
Expand All @@ -25,21 +25,18 @@ export default class InputBox extends Component {
<div className="form-group row">
<div className="offset-md-2 col-md-7">
<TextareaAutosize
value={this.state.value || ''}
value={this.state.value || ""}
onChange={(e) => this.setState({ value: e.target.value })}
placeholder="write something"
className="form-control"
/>
</div>
<div className="col-md-1">
<button
onClick={() => this.insertNote()}
className="btn btn-success"
>
<button onClick={() => this.insertNote()} className="btn btn-success">
Add
</button>
</div>
</div>
)
);
}
}
}
15 changes: 14 additions & 1 deletion imports/ui/navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
import React from "react";

export default () => {
return <div style={{ backgroundColor: "white", height: 50 }}>Listo</div>;
return (
<div
style={{
display: "flex",
flexDirection: "row",
justifyContent: "space-between",
backgroundColor: "#4995C7",
height: 50,
}}
>
<div>Listo</div>
<div>User</div>
</div>
);
};
274 changes: 274 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"react-autosize-textarea": "^7.1.0",
"react-dom": "^16.14.0",
"react-lines-ellipsis": "^0.14.1",
"react-modal": "^3.11.2"
"react-modal": "^3.11.2",
"reactstrap": "^8.7.1"
},
"meteor": {
"mainModule": {
Expand Down

0 comments on commit 7d8b487

Please sign in to comment.