Skip to content

Commit b025ceb

Browse files
committed
Disabled styles customizing fix and Readme fix
1 parent e10db92 commit b025ceb

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Insert the following selector anywhere in your project (global) or in your exist
5555
| **width** | number | Determines the width of the dropdown button & options drawer |
5656
| **placeholder** | string | The text shown on the dropdown button by default |
5757
| **prefix** | string | A text prefix that will be added before the placeholder text |
58+
| **disabled** | boolean | Set true if the dropdown should be disabled |
5859

5960
## Customized Styling
6061

@@ -64,6 +65,8 @@ Insert the following selector anywhere in your project (global) or in your exist
6465
| **hoverBackgroundColor** | string | Set the dropdown button & options hover background color |
6566
| **border** | string | Set the dropdown button & options border |
6667
| **textColor** | string | Set the dropdown button & options text color |
68+
| **disabledBackgroundColor** | string | Set the disabled dropdown button background color |
69+
| **disabledTextColor** | string | Set the disabled dropdown button text color |
6770

6871
## Events
6972
| Event Name | Returns | Description |
@@ -93,7 +96,8 @@ data: function() {
9396
},
9497
],
9598
prefix: "The",
96-
backgroundColor: "green"
99+
backgroundColor: "green",
100+
disabled: false,
97101
}
98102
}
99103
}

dropdown.scss

-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
$default-text-hover-color: black;
33
$default-hover-color: #cde4f5;
44
$default-text-color: #fff;
5-
$disabled-text-color: #555;
65
$option-padding: 4px 10px;
76

87
.dropdown {
@@ -82,7 +81,6 @@ $option-padding: 4px 10px;
8281
}
8382

8483
&.disabled {
85-
color: $disabled-text-color;
8684
cursor: not-allowed;
8785
}
8886
}

dropdown.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
backgroundExpandedColor: "#fff",
4949
hoverBackgroundColor: "#0084d4",
5050
disabledBackgroundColor: "#ccc",
51+
disabledTextColor: "#555",
5152
isExpanded: false,
5253
placeholder: "Placeholder",
5354
textColor: "black",
@@ -70,7 +71,7 @@
7071
{"--dropdown-expanded-color": this.backgroundExpandedColor},
7172
{"--dropdown-border": this.border},
7273
{"--dropdown-hover-background-color": this.hoverBackgroundColor},
73-
{"--dropdown-default-text-color": this.textColor}
74+
{"--dropdown-default-text-color": this.config.disabled ? this.disabledTextColor : this.textColor}
7475
];
7576
}
7677
},

0 commit comments

Comments
 (0)