mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-17 04:31:22 +08:00
chore: format script code.
This commit is contained in:
@ -21,27 +21,27 @@ const ICONS_PATH = path.resolve(process.cwd(), 'scripts/assets');
|
||||
export function darkMode() {
|
||||
const iconSunPath = path.resolve(ICONS_PATH, `sun.svg`);
|
||||
const iconMoonPath = path.resolve(ICONS_PATH, `moon.svg`);
|
||||
const sunNode = getSVGNode(iconSunPath)
|
||||
const moonNode = getSVGNode(iconMoonPath)
|
||||
const sunNode = getSVGNode(iconSunPath);
|
||||
const moonNode = getSVGNode(iconMoonPath);
|
||||
return [
|
||||
{
|
||||
type: 'element',
|
||||
tagName: 'button',
|
||||
properties: {
|
||||
id: 'darkMode',
|
||||
type: 'button'
|
||||
type: 'button',
|
||||
},
|
||||
children: [
|
||||
...sunNode,
|
||||
...moonNode
|
||||
]
|
||||
}, {
|
||||
children: [...sunNode, ...moonNode],
|
||||
},
|
||||
{
|
||||
type: 'element',
|
||||
tagName: 'script',
|
||||
children: [{
|
||||
type: 'text',
|
||||
value: scripts,
|
||||
}]
|
||||
}
|
||||
children: [
|
||||
{
|
||||
type: 'text',
|
||||
value: scripts,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user