mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 22:59:57 +08:00
Major CSS revamp
- Get rid of Bootstrap (except we still rely on some JS) - Use BEM class names - Rework variables/theme config - Fix various bugs, including some on mobile The CSS is still not ideal – it needs to be cleaned up some more. But that can be a focus for after beta.
This commit is contained in:
@ -10,16 +10,18 @@ export default class SelectDropdown extends Dropdown {
|
||||
static initProps(props) {
|
||||
super.initProps(props);
|
||||
|
||||
props.className += ' select-dropdown';
|
||||
props.className += ' Dropdown--select';
|
||||
}
|
||||
|
||||
getButtonContent() {
|
||||
const activeChild = this.props.children.filter(child => child.props.active)[0];
|
||||
const label = activeChild && activeChild.props.label;
|
||||
let label = activeChild && activeChild.props.children;
|
||||
|
||||
if (label instanceof Array) label = label[0];
|
||||
|
||||
return [
|
||||
<span className="label">{label}</span>,
|
||||
icon('sort', {className: 'caret'})
|
||||
<span className="Button-label">{label}</span>, ' ',
|
||||
icon('sort', {className: 'Button-caret'})
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user