mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
[PCCompat > Components > Settings] Add SliderInput
This commit is contained in:
parent
8c5ab0e49e
commit
473046a181
1 changed files with 25 additions and 0 deletions
25
moduleWrappers/powercord/components/settings/sliderInput.js
Normal file
25
moduleWrappers/powercord/components/settings/sliderInput.js
Normal 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) : '')
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue