Explorar o código

styling on dropdowns

Peter Holmberg %!s(int64=7) %!d(string=hai) anos
pai
achega
6ab93982ae

+ 3 - 3
public/app/core/components/Picker/SimplePicker.tsx

@@ -6,8 +6,8 @@ import ResetStyles from './ResetStyles';
 interface Props {
   className?: string;
   defaultValue?: any;
-  getOptionLabel?: (item: any) => string;
-  getOptionValue?: (item: any) => string;
+  getOptionLabel: (item: any) => string;
+  getOptionValue: (item: any) => string;
   onSelected: (item: any) => {} | void;
   options: any[];
   placeholder?: string;
@@ -28,7 +28,7 @@ const SimplePicker: SFC<Props> = ({
 }) => {
   return (
     <Select
-      classNamePrefix={`gf-form-select-box`}
+      classNamePrefix="gf-form-select-box"
       className={`${width ? 'width-' + width : ''} gf-form-input gf-form-input--form-dropdown ${className || ''}`}
       components={{
         Option: DescriptionOption,

+ 1 - 1
public/app/core/components/Picker/Unit/UnitPicker.tsx

@@ -63,7 +63,7 @@ export default class UnitPicker extends PureComponent<Props> {
     return (
       <Select
         classNamePrefix="gf-form-select-box"
-        className={`width-${width} gf-form-input--form-dropdown`}
+        className={`width-${width} gf-form-input gf-form-input--form-dropdown`}
         defaultValue={value}
         isSearchable={true}
         menuShouldScrollIntoView={false}

+ 1 - 1
public/sass/components/_form_select_box.scss

@@ -90,7 +90,7 @@ $select-input-bg-disabled: $input-bg-disabled;
 
 .gf-form-select-box__value-container {
   display: table-cell;
-  padding: 8px 10px;
+  padding: 6px 10px;
   > div {
     display: inline-block;
   }