mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
support render tab footer
This commit is contained in:
parent
9dce36f588
commit
28d5478875
@ -76,7 +76,9 @@ export default class SettingTab extends React.Component {
|
|||||||
if (this.props.withGroups) {
|
if (this.props.withGroups) {
|
||||||
const group = composeGroupsFromSettingsTab(this.tab.settings)
|
const group = composeGroupsFromSettingsTab(this.tab.settings)
|
||||||
|
|
||||||
return Object.entries(group).map(([groupKey, settings], index) => {
|
return <>
|
||||||
|
{
|
||||||
|
Object.entries(group).map(([groupKey, settings], index) => {
|
||||||
const fromDecoratorIcon = groupsDecorators[groupKey]?.icon
|
const fromDecoratorIcon = groupsDecorators[groupKey]?.icon
|
||||||
const fromDecoratorTitle = groupsDecorators[groupKey]?.title
|
const fromDecoratorTitle = groupsDecorators[groupKey]?.title
|
||||||
|
|
||||||
@ -106,7 +108,17 @@ export default class SettingTab extends React.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.tab.settings.map((setting, index) => {
|
{
|
||||||
|
this.tab.footer && React.createElement(this.tab.footer, {
|
||||||
|
ctx: this.state.processedCtx
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
|
||||||
|
return <>
|
||||||
|
{
|
||||||
|
this.tab.settings.map((setting, index) => {
|
||||||
return <SettingItemComponent
|
return <SettingItemComponent
|
||||||
key={index}
|
key={index}
|
||||||
setting={setting}
|
setting={setting}
|
||||||
@ -114,4 +126,12 @@ export default class SettingTab extends React.Component {
|
|||||||
/>
|
/>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
this.tab.footer && React.createElement(this.tab.footer, {
|
||||||
|
ctx: this.state.processedCtx
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</>
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user