[PCCompat > Components > Settings] Add SliderInput

This commit is contained in:
Ducko 2021-04-22 21:23:45 +01:00 committed by Lexi Sother
parent 8c5ab0e49e
commit 473046a181
No known key found for this signature in database
GPG Key ID: 355968D14144B739
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
const { React } = goosemodScope.webpackModules.common;
import FormItem from './formItem';
const OriginalSlider = goosemodScope.webpackModules.findByDisplayName('Slider');
const Margins = goosemodScope.webpackModules.findByProps('marginTop20', 'marginBottom20');
export default class TextInput extends React.PureComponent {
render() {
const title = this.props.children;
delete this.props.children;
return React.createElement(FormItem, {
title,
note: this.props.note,
required: this.props.required
},
React.createElement(OriginalSlider, {
...this.props,
className: Margins.marginTop20 + (this.props.className ? (' ' + this.props.className) : '')
})
);
}
}