Skip to content

Commit

Permalink
fix: add nui prefix to custom animation and placeload
Browse files Browse the repository at this point in the history
  • Loading branch information
stafyniaksacha committed Apr 17, 2023
1 parent 6295465 commit cc193c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/plugins/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ export default plugin.withOptions(
function (options = {}) {
return function ({ addComponents }) {
addComponents({
'.placeload': {
'.nui-placeload': {
position: 'relative',
background:
'linear-gradient( to right, rgb(0 0 0 / 7%) 8% ,rgb(0 0 0 / 15%) 18%, rgb(0 0 0 / 7%) 33%)',
backgroundSize: '1200px 104px',
},
'.dark .placeload': {
'.dark .nui-placeload': {
position: 'relative',
background:
'linear-gradient(to right, rgb(255 255 255 / 15%) 8%, rgb(255 255 255 / 24%) 18%, rgb(255 255 255 / 15%) 33%)',
Expand Down
9 changes: 5 additions & 4 deletions src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,19 @@ export default {
},
}),
keyframes: {
indeterminate: {
'nui-indeterminate': {
'0%': { 'margin-left': '-10%' },
'100%': { 'margin-left': '100%' },
},
placeload: {
'nui-placeload': {
'0%': { 'background-position': '-468px 0' },
'100%': { 'background-position': '468px 0' },
},
},
animation: {
indeterminate: 'indeterminate 1s cubic-bezier(0.4, 0, 0.2, 1) infinite',
placeload: 'placeload 1s linear infinite forwards',
'nui-indeterminate':
'nui-indeterminate 1s cubic-bezier(0.4, 0, 0.2, 1) infinite',
'nui-placeload': 'nui-placeload 1s linear infinite forwards',
},
},
},
Expand Down

0 comments on commit cc193c8

Please sign in to comment.