dashfolders: remove inline styles

This commit is contained in:
Daniel Lee 2018-01-30 17:26:44 +01:00
parent f5107d5023
commit 4bc5945c17
4 changed files with 14 additions and 12 deletions

View File

@ -41,18 +41,12 @@ class DescriptionOption extends Component<IProps, any> {
onMouseEnter={this.handleMouseEnter}
onMouseMove={this.handleMouseMove}
title={option.title}
className={`user-picker-option__button btn btn-link ${className} width-19`}
style={{
whiteSpace: 'normal',
// height: '55px',
}}
className={`description-picker-option__button btn btn-link ${className} width-19`}
>
<div className="gf-form">{children}</div>
<div className="gf-form">
<div className="muted width-17">{option.description}</div>
{className.indexOf('is-selected') > -1 && (
<i style={{ paddingLeft: '2px' }} className="fa fa-check" aria-hidden="true" />
)}
{className.indexOf('is-selected') > -1 && <i className="fa fa-check" aria-hidden="true" />}
</div>
</button>
);

View File

@ -130,20 +130,16 @@ const prepareItem = (item, dashboardId: number, isFolder: boolean) => {
item.sortRank = 0;
if (item.userId > 0) {
item.icon = 'fa fa-fw fa-user';
// TODO: Check what sce.trustAsHtml did
// item.nameHtml = this.$sce.trustAsHtml(item.userLogin);
item.nameHtml = item.userLogin;
item.sortName = item.userLogin;
item.sortRank = 10;
} else if (item.teamId > 0) {
item.icon = 'fa fa-fw fa-users';
// item.nameHtml = this.$sce.trustAsHtml(item.team);
item.nameHtml = item.team;
item.sortName = item.team;
item.sortRank = 20;
} else if (item.role) {
item.icon = 'fa fa-fw fa-street-view';
// item.nameHtml = this.$sce.trustAsHtml(`Everyone with <span class="query-keyword">${item.role}</span> Role`);
item.nameHtml = `Everyone with <span class="query-keyword">${item.role}</span> Role`;
item.sortName = item.role;
item.sortRank = 30;

View File

@ -91,6 +91,7 @@
@import 'components/popper';
@import 'components/form_select_box';
@import 'components/user-picker';
@import 'components/description-picker';
// PAGES
@import 'pages/login';

View File

@ -0,0 +1,11 @@
.description-picker-option__button {
position: relative;
text-align: left;
width: 100%;
display: block;
border-radius: 0;
white-space: normal;
i.fa-check {
padding-left: 2px;
}
}