mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-11 23:40:24 +00:00
feat:webui-2
This commit is contained in:
8
static/components/SettingSwitch.ts
Normal file
8
static/components/SettingSwitch.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export const SettingSwitch = (configKey?: string, isActive: boolean = false, extraData?: Record<string, string>) => {
|
||||
return `<setting-switch
|
||||
${configKey ? `data-config-key="${configKey}"` : ''}
|
||||
${isActive ? 'is-active' : ''}
|
||||
${extraData ? Object.keys(extraData).map((key) => `data-${key}="${extraData[key]}"`) : ''}
|
||||
>
|
||||
</setting-switch>`
|
||||
}
|
||||
Reference in New Issue
Block a user