Max - add styling to tooltip [skip ci]

This commit is contained in:
Max Red 2016-10-28 20:04:50 -03:00
parent af29c62d82
commit 59bfdf1128
3 changed files with 18 additions and 2 deletions

View File

@ -173,7 +173,10 @@ let DemoPage = React.createClass({
{
title: 'InfoTooltip',
render: (
<InfoTooltip type="warning" text="Some helping text" />
<div>
<InfoTooltip text="You should read the manual" />
<InfoTooltip type="warning" text="No staff member is assigned to this department." />
</div>
)
}
],

View File

@ -31,8 +31,12 @@ class InfoTooltip extends React.Component {
}
renderText() {
let message = (this.props.type === 'default') ? 'Information' : 'Warning';
return (
<div className="info-tooltip__text">
<div className="info-tooltip__text__title">
{message}
</div>
{this.props.text}
</div>
);

View File

@ -2,7 +2,10 @@
.info-tooltip {
&__text {
&__title {
color: $secondary-blue;
font-size: $font-size--md;
}
}
&__icon {
@ -13,5 +16,11 @@
.info-tooltip__icon {
color: $primary-red;
}
.info-tooltip__text {
&__title {
color: $primary-red;
}
}
}
}