-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1465 from weaveworks/truncate-container-envs
Limit tables to 20 rows
- Loading branch information
Showing
5 changed files
with
159 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import classnames from 'classnames'; | ||
|
||
|
||
class Warning extends React.Component { | ||
|
||
constructor(props, context) { | ||
super(props, context); | ||
this.handleClick = this.handleClick.bind(this); | ||
this.state = { | ||
expanded: false | ||
}; | ||
} | ||
|
||
handleClick() { | ||
const expanded = !this.state.expanded; | ||
this.setState({ expanded }); | ||
} | ||
|
||
render() { | ||
const { text } = this.props; | ||
const { expanded } = this.state; | ||
|
||
const className = classnames('warning', { | ||
'warning-expanded': expanded | ||
}); | ||
|
||
return ( | ||
<div className={className} onClick={this.handleClick}> | ||
<div className="warning-wrapper"> | ||
<span className="warning-icon fa fa-warning" title={text} /> | ||
{expanded && <span className="warning-text">{text}</span>} | ||
</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Warning; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters