Improving UI for the search popover

Этот коммит содержится в:
Asaad Mahmood
2015-10-23 11:34:56 +05:00
родитель 691d66f5a3
Коммит 210e2a062d
3 изменённых файлов: 34 добавлений и 11 удалений

Просмотреть файл

@@ -8,7 +8,7 @@ var AppDispatcher = require('../dispatcher/app_dispatcher.jsx');
var utils = require('../utils/utils.jsx'); var utils = require('../utils/utils.jsx');
var Constants = require('../utils/constants.jsx'); var Constants = require('../utils/constants.jsx');
var ActionTypes = Constants.ActionTypes; var ActionTypes = Constants.ActionTypes;
var Tooltip = ReactBootstrap.Tooltip; var Popover = ReactBootstrap.Popover;
export default class SearchBar extends React.Component { export default class SearchBar extends React.Component {
constructor() { constructor() {
@@ -163,7 +163,7 @@ export default class SearchBar extends React.Component {
onMouseUp={this.handleMouseInput} onMouseUp={this.handleMouseInput}
/> />
{isSearching} {isSearching}
<Tooltip <Popover
placement='bottom' placement='bottom'
className={helpClass} 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> <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> </li>
</ul> </ul>
</Tooltip> </Popover>
</form> </form>
</div> </div>
); );

Просмотреть файл

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

Просмотреть файл

@@ -21,21 +21,43 @@
} }
.search-help-popover { .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 { h4 {
text-align: left; font-size: 1em;
} }
ul { ul {
padding-left: 2em; padding-left: 17px;
text-align: left; span {
@include opacity(0.7);
}
strong, b {
@include opacity(1);
}
} }
.tooltip-inner { .tooltip-inner {
max-width: 100%; max-width: 100%;
} }
}
.search-help-popover.visible { &.visible {
opacity: 100; visibility: visible;
transition: opacity 0.3s; @include opacity(1);
}
} }