mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 07:41:26 +00:00
@@ -4,8 +4,7 @@ import classnames from 'classnames';
|
||||
|
||||
import '../../../css/switch.css';
|
||||
|
||||
function Switch(props) {
|
||||
const { onChange, checked, placeholder, disabled, className, size, textPosition, setRef } = props;
|
||||
function Switch({ onChange, checked, placeholder, disabled, className, size, textPosition = 'left', setRef }) {
|
||||
return (
|
||||
<div className={classnames('seahub-switch position-relative', className, size)} ref={setRef}>
|
||||
<label className="custom-switch">
|
||||
@@ -40,8 +39,4 @@ Switch.propTypes = {
|
||||
setRef: PropTypes.func
|
||||
};
|
||||
|
||||
Switch.defaultProps = {
|
||||
textPosition: 'left',
|
||||
};
|
||||
|
||||
export default Switch;
|
||||
|
Reference in New Issue
Block a user