mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added usePadding
option
This commit is contained in:
parent
e5fdc90a9e
commit
42548d2af7
@ -1,5 +1,6 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import * as antd from "antd"
|
import * as antd from "antd"
|
||||||
|
import classnames from "classnames"
|
||||||
|
|
||||||
import { Translation } from "react-i18next"
|
import { Translation } from "react-i18next"
|
||||||
import { SliderPicker } from "react-color"
|
import { SliderPicker } from "react-color"
|
||||||
@ -440,7 +441,7 @@ export default class SettingItemComponent extends React.PureComponent {
|
|||||||
|
|
||||||
const Component = SettingsComponents[String(this.props.setting.component).toLowerCase()]?.component ?? this.props.setting.component
|
const Component = SettingsComponents[String(this.props.setting.component).toLowerCase()]?.component ?? this.props.setting.component
|
||||||
|
|
||||||
return <div className="setting_item" id={this.props.setting.id} key={this.props.setting.id}>
|
return <div className={classnames("setting_item", { ["usePadding"]: this.props.setting.usePadding ?? true })} id={this.props.setting.id} key={this.props.setting.id}>
|
||||||
<div className="setting_item_header">
|
<div className="setting_item_header">
|
||||||
<div className="setting_item_info">
|
<div className="setting_item_info">
|
||||||
<div className="setting_item_header_title">
|
<div className="setting_item_header_title">
|
||||||
|
@ -97,6 +97,12 @@
|
|||||||
|
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
|
||||||
|
&.usePadding {
|
||||||
|
.setting_item_content {
|
||||||
|
padding: 5px 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.setting_item_header {
|
.setting_item_header {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -135,7 +141,7 @@
|
|||||||
|
|
||||||
.setting_item_content {
|
.setting_item_content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 5px 20px;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user