Skip to content

Commit

Permalink
fix(progress): add missing progress-indeterminate animation
Browse files Browse the repository at this point in the history
  • Loading branch information
stafyniaksacha committed Aug 27, 2023
1 parent f468417 commit b45a520
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
20 changes: 19 additions & 1 deletion src/plugins/components/progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,30 @@ export default plugin.withOptions(
})
}
},
function () {
function (options) {
let { prefix } = defu(options, defaultPluginOptions)

if (prefix) {
prefix = `${prefix}-`
}

return {
theme: {
shurikenUi: {
progress: defaultProgressConfig,
},
extend: {
keyframes: {
[`${prefix}progress-indeterminate`]: {
'0%': { 'margin-left': '-100%' },
'60%': { 'margin-left': '100%' },
'100%': { 'margin-left': '-100%' },
},
},
animation: {
[`${prefix}progress-indeterminate`]: `${prefix}progress-indeterminate 3s linear infinite forwards`,
},
},
},
}
}
Expand Down
10 changes: 0 additions & 10 deletions src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,6 @@ export function createPreset(options: PluginOption = {}) {
},
},
}),
keyframes: {
'nui-indeterminate': {
'0%': { 'margin-left': '-10%' },
'100%': { 'margin-left': '100%' },
},
},
animation: {
'nui-indeterminate':
'nui-indeterminate 1s cubic-bezier(0.4, 0, 0.2, 1) infinite',
},
},
},
} satisfies Config
Expand Down

0 comments on commit b45a520

Please sign in to comment.