mirror of
https://github.com/flarum/framework.git
synced 2025-04-02 23:19:04 +08:00
Sort out default dropdown caret icons
This commit is contained in:
parent
82e0f955e8
commit
043767adcd
@ -25,7 +25,7 @@ export default class Dropdown extends Component {
|
|||||||
props.buttonClassName = props.buttonClassName || '';
|
props.buttonClassName = props.buttonClassName || '';
|
||||||
props.contentClassName = props.contentClassName || '';
|
props.contentClassName = props.contentClassName || '';
|
||||||
props.label = props.label || app.trans('core.controls');
|
props.label = props.label || app.trans('core.controls');
|
||||||
props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'sort';
|
props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'caret-down';
|
||||||
}
|
}
|
||||||
|
|
||||||
view() {
|
view() {
|
||||||
|
@ -13,10 +13,11 @@ import icon from 'flarum/helpers/icon';
|
|||||||
*/
|
*/
|
||||||
export default class SelectDropdown extends Dropdown {
|
export default class SelectDropdown extends Dropdown {
|
||||||
static initProps(props) {
|
static initProps(props) {
|
||||||
|
props.caretIcon = typeof props.caretIcon !== 'undefined' ? props.caretIcon : 'sort';
|
||||||
|
|
||||||
super.initProps(props);
|
super.initProps(props);
|
||||||
|
|
||||||
props.className += ' Dropdown--select';
|
props.className += ' Dropdown--select';
|
||||||
props.caretIcon = props.caretIcon || 'sort';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getButtonContent() {
|
getButtonContent() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user