mirror of
https://github.com/mue/mue.git
synced 2026-07-16 13:34:03 +02:00
Dropdowns are now standalone class
This commit is contained in:
20
src/components/modals/settings/Dropdown.jsx
Normal file
20
src/components/modals/settings/Dropdown.jsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
|
||||
export default class Dropdown extends React.PureComponent {
|
||||
getLabel() {
|
||||
return this.props.label ? <label htmlFor={this.props.name}>{this.props.label} </label> : null;
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
{this.getLabel()}
|
||||
<div className='dropdown' style={{ display: 'inline' }}>
|
||||
<select name={this.props.name} id={this.props.id} onChange={this.props.onChange}>
|
||||
{this.props.children}
|
||||
</select>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user