From af34dce5f0b7e8a5621a6a1a8d9231b4f3906082 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Thu, 12 Oct 2023 13:37:30 +1100 Subject: [PATCH 1/2] fix(@dpc-sdp/ripple-ui-core): :bug: only render icon if item has text or url --- .../contact-us/RplContactUs.stories.mdx | 5 ++ .../src/components/list/RplList.vue | 60 +++++++++---------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/packages/ripple-ui-core/src/components/contact-us/RplContactUs.stories.mdx b/packages/ripple-ui-core/src/components/contact-us/RplContactUs.stories.mdx index 11680e7258..9a67c988ee 100644 --- a/packages/ripple-ui-core/src/components/contact-us/RplContactUs.stories.mdx +++ b/packages/ripple-ui-core/src/components/contact-us/RplContactUs.stories.mdx @@ -71,6 +71,11 @@ export const SingleTemplate = (args) => ({ text: '@instagramhandle', url: 'https://i', icon: 'icon-instagram' + }, + { + text: '', + url: '', + icon: 'icon-browser' } ] }} diff --git a/packages/ripple-ui-core/src/components/list/RplList.vue b/packages/ripple-ui-core/src/components/list/RplList.vue index 8b0fc6a9fb..278770437c 100644 --- a/packages/ripple-ui-core/src/components/list/RplList.vue +++ b/packages/ripple-ui-core/src/components/list/RplList.vue @@ -62,19 +62,29 @@ const handleClick = (item: IRplListItemArray, index: number) => { :class="['rpl-list__items', containerClass ? containerClass : null]" :data-depth="depth" > -
  • - +
  • + + + {{ item.text }} + + { > {{ item.text }} - - - {{ item.text }} - - -
  • + From e0e89fd51ee991dcf64a1a250ed64e88ea5588ca Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Thu, 12 Oct 2023 14:13:07 +1100 Subject: [PATCH 2/2] refactor(@dpc-sdp/ripple-ui-core): :recycle: check for url or text --- packages/ripple-ui-core/src/components/list/RplList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ripple-ui-core/src/components/list/RplList.vue b/packages/ripple-ui-core/src/components/list/RplList.vue index 278770437c..df73feeac1 100644 --- a/packages/ripple-ui-core/src/components/list/RplList.vue +++ b/packages/ripple-ui-core/src/components/list/RplList.vue @@ -64,7 +64,7 @@ const handleClick = (item: IRplListItemArray, index: number) => { >