[PCCompat > Components > Settings] Add Category

This commit is contained in:
Ducko 2021-04-23 18:07:52 +01:00 committed by Lexi Sother
parent 66c669eac3
commit 82109f936c
No known key found for this signature in database
GPG Key ID: 355968D14144B739
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,31 @@
const { React } = goosemodScope.webpackModules.common;
import FormItem from './formItem';
export default class Category extends React.PureComponent {
render() {
const children = this.props.opened ? this.props.children : [];
return React.createElement(FormItem, {
title: React.createElement('div', {
},
React.createElement('svg', {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: this.props.opened ? "opened" : ""
},
React.createElement('path', {
fill: 'var(--header-primary)',
d: 'M9.29 15.88L13.17 12 9.29 8.12c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0l4.59 4.59c.39.39.39 1.02 0 1.41L10.7 17.3c-.39.39-1.02.39-1.41 0-.38-.39-.39-1.03 0-1.42z'
})
)),
note: this.props.description
},
...children
);
}
}

View File

@ -3,5 +3,6 @@ export { default as TextInput } from './textInput';
export { default as SliderInput } from './sliderInput';
export { default as Divider } from './divider';
export { default as ButtonItem } from './buttonItem';
export { default as Category } from './category';
export const SwitchItem = goosemodScope.webpackModules.findByDisplayName('SwitchItem');