Skip to content

Commit a037972

Browse files
committed
docs: disable all animations
1 parent af4dced commit a037972

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

docs/app.config.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,27 @@ const motions = {
122122
},
123123
}
124124

125-
// disable all documentation motions
126-
Object.entries(motions).forEach(([_, val]) => {
127-
Object.keys(val).forEach((k) => {
128-
// nested motion config
125+
/**
126+
* This is to disable animations, the animations are a bit much and need tweaking
127+
* we should also provide a way for users to disable them when enabled.
128+
*/
129+
for (const val of Object.values(motions)) {
130+
// set each variant to an empty object
131+
for (const k of Object.keys(val)) {
132+
// h1,common are nested reset their variants to an empty object
129133
if (['h1', 'common'].includes(k)) {
130-
Object.keys(val).forEach((kNested) => {
131-
val[k][kNested] = {}
132-
})
134+
// @ts-expect-error not specific
135+
for (const nestedK of Object.keys(val[k])) {
136+
// @ts-expect-error not specific
137+
val[k][nestedK] = {}
138+
}
133139
}
134140
else {
141+
// @ts-expect-error not specific
135142
val[k] = {}
136143
}
137-
})
138-
})
144+
}
145+
}
139146

140147
export default defineAppConfig({
141148
ui: {

0 commit comments

Comments
 (0)