Skip to content

Commit

Permalink
fix(magic): disable enableMagicAnimations with default
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed Jan 29, 2024
1 parent 208ffc5 commit baa693c
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions packages/core/src/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@ import { nomarlizeTheme } from './core'
import type { CustomStaticShortcuts, ResolvedOptions, UsefulOptions, UsefulTheme } from './types'
import { cssObj2StrSync, deepMerge, resolveAnimation } from './utils'

const defaultOptions: UsefulOptions = {
uno: true,
attributify: true,
icons: true,
webFonts: false,
typography: false,
tagify: false,
remToPx: false,
scrollbar: false,
theme: {},
enableDefaultShortcuts: true,
enableMagicAnimations: false,
important: false,
}

export function resolveOptions(options: UsefulOptions) {
const defaultOptions: UsefulOptions = {
uno: true,
attributify: true,
icons: true,
webFonts: false,
typography: false,
tagify: false,
remToPx: false,
scrollbar: false,
theme: {},
enableDefaultShortcuts: true,
enableMagicAnimations: true,
important: false,
}
const optionsWithDefault = Object.assign({}, defaultOptions, options) as Required<UsefulOptions>
optionsWithDefault.unColor = typeof optionsWithDefault.unColor === 'string'
? optionsWithDefault.unColor
Expand Down

0 comments on commit baa693c

Please sign in to comment.