mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
11 lines
456 B
TypeScript
11 lines
456 B
TypeScript
import { SettingOption } from "./option";
|
|
|
|
export const SettingSelect = (items: Array<{ text: string, value: string }>, configKey?: string, configValue?: any) => {
|
|
return `<setting-select ${configKey ? `data-config-key="${configKey}"` : ''}>
|
|
<div>
|
|
${items.map((e, i) => {
|
|
return SettingOption(e.text, e.value, (configKey && configValue ? configValue === e.value : i === 0));
|
|
}).join('')}
|
|
</div>
|
|
</setting-select>`;
|
|
} |