From bff2abf68a89b3a69c7e4622dd6df9185a7660e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Wed, 24 May 2023 13:09:45 +0300 Subject: [PATCH] Refactor #3965 - For ScrollTop --- components/lib/avatar/BaseAvatar.vue | 2 +- components/lib/chip/BaseChip.vue | 4 +- components/lib/inplace/BaseInplace.vue | 4 +- components/lib/scrolltop/BaseScrollTop.vue | 80 ++++++++++++++++++++++ components/lib/scrolltop/ScrollTop.d.ts | 5 ++ components/lib/scrolltop/ScrollTop.vue | 64 ++--------------- 6 files changed, 94 insertions(+), 65 deletions(-) create mode 100644 components/lib/scrolltop/BaseScrollTop.vue diff --git a/components/lib/avatar/BaseAvatar.vue b/components/lib/avatar/BaseAvatar.vue index c2775927a..23e3a136a 100644 --- a/components/lib/avatar/BaseAvatar.vue +++ b/components/lib/avatar/BaseAvatar.vue @@ -48,7 +48,7 @@ const classes = { icon: ({ props }) => ['p-avatar-icon', props.icon] }; -const { load: loadStyle } = useStyle(styles, { id: 'primevue_divider_style', manual: true }); +const { load: loadStyle } = useStyle(styles, { id: 'primevue_avatar_style', manual: true }); export default { name: 'BaseAvatar', diff --git a/components/lib/chip/BaseChip.vue b/components/lib/chip/BaseChip.vue index 219e5aca4..a8697fb4c 100644 --- a/components/lib/chip/BaseChip.vue +++ b/components/lib/chip/BaseChip.vue @@ -38,10 +38,10 @@ const classes = { removeIcon: ({ props }) => ['p-chip-remove-icon', props.removeIcon] }; -const { load: loadStyle } = useStyle(styles, { id: 'primevue_divider_style', manual: true }); +const { load: loadStyle } = useStyle(styles, { id: 'primevue_chip_style', manual: true }); export default { - name: 'BaseAvatar', + name: 'BaseChip', extends: BaseComponent, props: { label: { diff --git a/components/lib/inplace/BaseInplace.vue b/components/lib/inplace/BaseInplace.vue index 77642aad7..207e5b049 100644 --- a/components/lib/inplace/BaseInplace.vue +++ b/components/lib/inplace/BaseInplace.vue @@ -29,10 +29,10 @@ const classes = { closeButton: ({ props }) => props.closeIcon }; -const { load: loadStyle } = useStyle(styles, { id: 'primevue_divider_style', manual: true }); +const { load: loadStyle } = useStyle(styles, { id: 'primevue_inplace_style', manual: true }); export default { - name: 'BaseAvatar', + name: 'BaseInplace', extends: BaseComponent, props: { closable: { diff --git a/components/lib/scrolltop/BaseScrollTop.vue b/components/lib/scrolltop/BaseScrollTop.vue new file mode 100644 index 000000000..ec4c18cd3 --- /dev/null +++ b/components/lib/scrolltop/BaseScrollTop.vue @@ -0,0 +1,80 @@ + diff --git a/components/lib/scrolltop/ScrollTop.d.ts b/components/lib/scrolltop/ScrollTop.d.ts index bc65e65d2..873753955 100644 --- a/components/lib/scrolltop/ScrollTop.d.ts +++ b/components/lib/scrolltop/ScrollTop.d.ts @@ -82,6 +82,11 @@ export interface ScrollTopProps { * @type {ScrollTopPassThroughOptions} */ pt?: ScrollTopPassThroughOptions; + /** + * When enabled, it removes component related styles in the core. + * @defaultValue false + */ + unstyled?: boolean; } /** diff --git a/components/lib/scrolltop/ScrollTop.vue b/components/lib/scrolltop/ScrollTop.vue index 3e12a1e7d..fee9fe101 100644 --- a/components/lib/scrolltop/ScrollTop.vue +++ b/components/lib/scrolltop/ScrollTop.vue @@ -1,41 +1,23 @@ - -