From 5c07112e319459524b1abeae304130b39843de0f Mon Sep 17 00:00:00 2001 From: Manjiri Tapaswi Date: Fri, 13 Dec 2024 12:02:09 -0800 Subject: [PATCH] fix(*): apply pr feedback --- .../docs/entity-empty-state.md | 8 +-- .../sandbox/pages/EntityEmptyStatePage.vue | 2 +- .../entity-empty-state/EntityEmptyState.vue | 68 ++++++++++--------- 3 files changed, 40 insertions(+), 38 deletions(-) diff --git a/packages/entities/entities-shared/docs/entity-empty-state.md b/packages/entities/entities-shared/docs/entity-empty-state.md index bd6a10599b..ae7e650b59 100644 --- a/packages/entities/entities-shared/docs/entity-empty-state.md +++ b/packages/entities/entities-shared/docs/entity-empty-state.md @@ -52,17 +52,17 @@ If provided, a CTA button will show with text and icon typically, for creating a #### `learnMoreLink` -- type: `String` -- default: `` +- type: `Boolean` +- default: false -If provided, will link to the Learning Hub link for the entity. +If provided, will show the Learning Hub button for the entity. #### `features` - type: `Array` - default: `[]` -If provided, will display card for each feature of that entity, along with an icon, a tilte and a short description. +If provided, will display card for each feature of that entity, along with an icon, a title and a short description. ### Usage example diff --git a/packages/entities/entities-shared/sandbox/pages/EntityEmptyStatePage.vue b/packages/entities/entities-shared/sandbox/pages/EntityEmptyStatePage.vue index 51b8348222..85a4212dc3 100644 --- a/packages/entities/entities-shared/sandbox/pages/EntityEmptyStatePage.vue +++ b/packages/entities/entities-shared/sandbox/pages/EntityEmptyStatePage.vue @@ -6,7 +6,7 @@ action-button-text="Create a gateway" description="Lorem ipsum dolor sit amet consectetur adipisicing elit. Id quidem aperiam similique vitae beatae. Repellat quam voluptas vitae, maxime consequuntur praesentium suscipit. Numquam aliquid nulla vel esse accusantium reiciendis error?" :features="features" - learn-more-link="https://konghq.com" + learn-more-link pricing="Lorem ipsum dolor sit amet consectetur adipisicing elit." title="Gateway Manager" @create-button-clicked="console.log('create button clicked')" diff --git a/packages/entities/entities-shared/src/components/entity-empty-state/EntityEmptyState.vue b/packages/entities/entities-shared/src/components/entity-empty-state/EntityEmptyState.vue index 8450b6863d..06a0ec2e3a 100644 --- a/packages/entities/entities-shared/src/components/entity-empty-state/EntityEmptyState.vue +++ b/packages/entities/entities-shared/src/components/entity-empty-state/EntityEmptyState.vue @@ -14,9 +14,10 @@
+
{{ title }}
@@ -39,7 +40,9 @@ class="entity-empty-state-pricing" >

- {{ t('emptyState.pricingTitle') }} {{ pricing }} + {{ t('emptyState.pricingTitle') }} + {{ pricing }} +

@@ -51,7 +54,7 @@
@@ -101,7 +104,6 @@ import type { EmptyStateFeature } from 'src/types/entity-empty-state' import { KUI_ICON_SIZE_40, KUI_COLOR_TEXT_NEUTRAL_STRONGER } from '@kong/design-tokens' const getEntityIcon = (iconType: string): object => { - console.log(iconType) switch (iconType) { case 'deploy': return DeployIcon @@ -134,8 +136,8 @@ defineProps({ default: '', }, learnMoreLink: { - type: String, - default: '', + type: Boolean, + default: false, }, features: { type: Array as PropType, @@ -151,19 +153,19 @@ const { i18n: { t } } = composables.useI18n()