-
Notifications
You must be signed in to change notification settings - Fork 2
CSS Fixes #145
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
base: master
Are you sure you want to change the base?
CSS Fixes #145
Changes from all commits
89eb216
a335ecb
d537f08
13a1e2a
04079e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import PropTypes from 'prop-types' | ||
|
|
||
| class Notification extends React.Component { | ||
| constructor(props) { | ||
| super(props) | ||
| this.state = { visible: true } | ||
| } | ||
|
|
||
| toggle() { | ||
| this.setState({ visible: !this.state.visible }) | ||
| } | ||
|
|
||
| render() { | ||
| const { message, type } = this. props | ||
|
|
||
| if (!this.state.visible) { | ||
| return null | ||
| } | ||
|
|
||
| return ( | ||
| <div className={`${type}-alert container`}> | ||
| <div className="inner-container text-center"> | ||
| {message} | ||
| <button | ||
| className="button-close" | ||
| type="button" | ||
| onClick={() => this.toggle()} | ||
| >╳</button> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about |
||
| </div> | ||
| </div> | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| //Display this crazy stuff | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this comment? 😀 |
||
| Notification.propTypes = { | ||
| message: PropTypes.string.isRequired, | ||
| type: PropTypes.string.isRequired | ||
| } | ||
|
|
||
| export default Notification | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,9 @@ | |
| .layout-children-container { | ||
| flex: 1 0 auto; | ||
| } | ||
|
|
||
| .container-fluid{ | ||
| width: 100%; | ||
| } | ||
| .container { | ||
| position: relative; | ||
| margin: 0 auto; | ||
|
|
@@ -20,6 +22,28 @@ | |
| width: 100%; | ||
| } | ||
|
|
||
| .inner-container { | ||
| @extend .container; | ||
| width: 1110px; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be in a media query? Actually I don't know if the app has a responsive layout right now, so maybe it doesn't matter. 🤔 |
||
| padding: 0; | ||
| } | ||
|
|
||
| .notice-alert { | ||
| z-index: 10; | ||
| height: 60px; | ||
| padding: 23px 20px 20px 20px; | ||
| margin-top: -52px; | ||
| position: fixed; | ||
| color: $notice-message-text; | ||
| background: $notice-message-bg; | ||
| } | ||
|
|
||
| .error-alert { | ||
| @extend .notice-alert; | ||
| color: $error-message-text; | ||
| background: $error-message-bg; | ||
| } | ||
|
|
||
| .footer { | ||
| padding: 3rem 1.5rem 6rem; | ||
| background-color: $form; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a stray space after
this.. 👀