Skip to content

Commit

Permalink
docs: disable all animations
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbieGoede committed Nov 27, 2024
1 parent bc1c259 commit 7a30902
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions docs/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,27 @@ const motions = {
},
}

// disable all documentation motions
Object.entries(motions).forEach(([_, val]) => {
Object.keys(val).forEach((k) => {
// nested motion config
/**
* This is to disable animations, the animations are a bit much and need tweaking
* we should also provide a way for users to disable them when enabled.
*/
for (const val of Object.values(motions)) {
// set each variant to an empty object
for (const k of Object.keys(val)) {
// h1,common are nested reset their variants to an empty object
if (['h1', 'common'].includes(k)) {
Object.keys(val).forEach((kNested) => {
val[k][kNested] = {}
})
// @ts-expect-error not specific
for (const nestedK of Object.keys(val[k])) {
// @ts-expect-error not specific
val[k][nestedK] = {}
}
}
else {
// @ts-expect-error not specific
val[k] = {}
}
})
})
}
}

export default defineAppConfig({
ui: {
Expand Down

0 comments on commit 7a30902

Please sign in to comment.