Improving UI for the search popover

This commit is contained in:
Asaad Mahmood
2015-10-23 11:34:56 +05:00
parent 691d66f5a3
commit 210e2a062d
3 changed files with 34 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ var AppDispatcher = require('../dispatcher/app_dispatcher.jsx');
var utils = require('../utils/utils.jsx');
var Constants = require('../utils/constants.jsx');
var ActionTypes = Constants.ActionTypes;
var Tooltip = ReactBootstrap.Tooltip;
var Popover = ReactBootstrap.Popover;
export default class SearchBar extends React.Component {
constructor() {
@@ -163,7 +163,7 @@ export default class SearchBar extends React.Component {
onMouseUp={this.handleMouseInput}
/>
{isSearching}
<Tooltip
<Popover
placement='bottom'
className={helpClass}
>
@@ -176,7 +176,7 @@ export default class SearchBar extends React.Component {
<span>{'Use '}</span><b>{'from:'}</b><span>{' to find posts from specific users and '}</span><b>{'in:'}</b><span>{' to find posts in specific channels'}</span>
</li>
</ul>
</Tooltip>
</Popover>
</form>
</div>
);

View File

@@ -40,6 +40,7 @@ img {
}
.popover {
@include border-radius(3px);
color: #333;
&.bottom, &.right, &.top, &.left {
>.arrow:after {

View File

@@ -21,21 +21,43 @@
}
.search-help-popover {
transition: opacity 0.3s;
visibility: hidden;
max-width: none;
width: 100%;
top: 36px;
@include single-transition(opacity, 0.3s, ease-in);
font-size: em(13px);
&.bottom > .arrow {
top: -18px;
border-width: 9px;
left: 30px;
}
.popover-content {
padding: 3px 13px;
}
h4 {
text-align: left;
font-size: 1em;
}
ul {
padding-left: 2em;
text-align: left;
padding-left: 17px;
span {
@include opacity(0.7);
}
strong, b {
@include opacity(1);
}
}
.tooltip-inner {
max-width: 100%;
}
}
.search-help-popover.visible {
opacity: 100;
transition: opacity 0.3s;
&.visible {
visibility: visible;
@include opacity(1);
}
}