Commit 146af859 by Daniel Lee

dashfolders: css class as parameter for Picker

For the permissions picker, pass in an extra class to decide
if the description should be aligned left or right.
parent 5ee2d1de
......@@ -25,6 +25,7 @@ export default class DisabledPermissionListItem extends Component<IProps, any> {
handlePicked={() => {}}
value={item.permission}
disabled={true}
className={'gf-form-input--form-dropdown-right'}
/>
</div>
</td>
......
......@@ -32,6 +32,7 @@ export default observer(({ item, removeItem, permissionChanged, itemIndex, folde
handlePicked={handleChangePermission}
value={item.permission}
disabled={item.inherited}
className={'gf-form-input--form-dropdown-right'}
/>
</div>
</td>
......
......@@ -7,6 +7,7 @@ export interface IProps {
handlePicked: (permission) => void;
value: number;
disabled: boolean;
className?: string;
}
export interface OptionWithDescription {
......@@ -22,7 +23,7 @@ class DescriptionPicker extends Component<IProps, any> {
}
render() {
const { optionsWithDesc, handlePicked, value, disabled } = this.props;
const { optionsWithDesc, handlePicked, value, disabled, className } = this.props;
return (
<div className="permissions-picker">
......@@ -34,7 +35,7 @@ class DescriptionPicker extends Component<IProps, any> {
labelKey="label"
options={optionsWithDesc}
onChange={handlePicked}
className="width-7 gf-form-input gf-form-input--form-dropdown"
className={`width-7 gf-form-input gf-form-input--form-dropdown ${className || ''}`}
optionComponent={DescriptionOption}
placeholder="Choose"
disabled={disabled}
......
......@@ -39,10 +39,6 @@ $select-option-selected-bg: $dropdownLinkBackgroundActive;
color: $input-color-placeholder;
}
.Select-menu-outer {
right: 0;
}
> .Select-control {
@include select-control();
border-color: $dark-3;
......@@ -102,3 +98,9 @@ $select-option-selected-bg: $dropdownLinkBackgroundActive;
}
}
}
.gf-form-input--form-dropdown-right {
.Select-menu-outer {
right: 0;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment