mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
15 lines
466 B
TypeScript
15 lines
466 B
TypeScript
export const SettingItem = (
|
|
title: string,
|
|
subtitle?: string,
|
|
action?: string,
|
|
id?: string,
|
|
visible: boolean = true,
|
|
) => {
|
|
return `<setting-item ${id ? `id="${id}"` : ''} ${!visible ? 'is-hidden' : ''}>
|
|
<div>
|
|
<setting-text>${title}</setting-text>
|
|
${subtitle ? `<setting-text data-type="secondary">${subtitle}</setting-text>` : ''}
|
|
</div>
|
|
${action ? `<div>${action}</div>` : ''}
|
|
</setting-item>`
|
|
} |