Skip to content

Commit

Permalink
fix(entities): icon prop warning of kbutton (#1396)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopoldthecoder authored May 10, 2024
1 parent c59cab3 commit bb1756c
Show file tree
Hide file tree
Showing 25 changed files with 77 additions and 23 deletions.
1 change: 1 addition & 0 deletions packages/entities/entities-certificates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
},
"dependencies": {
"@kong-ui-public/entities-shared": "workspace:^",
"@kong/icons": "^1.9.1",
"@peculiar/x509": "^1.9.7"
},
"distSizeChecker": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-ca-certificate"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t('ca-certificates.list.toolbar_actions.new_ca_certificate') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -146,6 +146,7 @@ import type { PropType } from 'vue'
import { computed, ref, watch, onBeforeMount } from 'vue'
import type { AxiosError } from 'axios'
import { useRouter } from 'vue-router'
import { AddIcon } from '@kong/icons'
import composables from '../composables'
import endpoints from '../ca-certificates-endpoints'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-certificate"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t('certificates.list.toolbar_actions.new_certificate') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -170,6 +170,7 @@ import type { PropType } from 'vue'
import { computed, ref, watch, onBeforeMount } from 'vue'
import type { AxiosError } from 'axios'
import { useRouter } from 'vue-router'
import { AddIcon } from '@kong/icons'
import composables from '../composables'
import endpoints from '../certificates-endpoints'
Expand Down
3 changes: 2 additions & 1 deletion packages/entities/entities-consumer-credentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"errorLimit": "300KB"
},
"dependencies": {
"@kong-ui-public/entities-shared": "workspace:^"
"@kong-ui-public/entities-shared": "workspace:^",
"@kong/icons": "^1.9.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-credential"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t(`credentials.list.toolbar_actions.${config.plugin}.new`) }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -191,6 +191,7 @@
import type { PropType } from 'vue'
import { computed, ref, watch, onBeforeMount } from 'vue'
import type { AxiosError } from 'axios'
import { AddIcon } from '@kong/icons'
import composables from '../composables'
import endpoints from '../consumer-credentials-endpoints'
import {
Expand Down
3 changes: 2 additions & 1 deletion packages/entities/entities-consumer-groups/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"errorLimit": "500KB"
},
"dependencies": {
"@kong-ui-public/entities-shared": "workspace:^"
"@kong-ui-public/entities-shared": "workspace:^",
"@kong/icons": "^1.9.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-consumer-group"
icon="plus"
size="large"
:to="config.consumerId ? undefined : config.createRoute"
@click="() => config.consumerId ? handleAddToGroupClick() : undefined"
>
<AddIcon />
{{ config.consumerId ? t('consumer_groups.actions.add_to_group') : t('consumer_groups.list.toolbar_actions.new_consumer_group') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -181,6 +181,7 @@ import type { PropType } from 'vue'
import { computed, ref, watch, onBeforeMount } from 'vue'
import type { AxiosError } from 'axios'
import { useRouter } from 'vue-router'
import { AddIcon } from '@kong/icons'
import composables from '../composables'
import endpoints from '../consumer-groups-endpoints'
import {
Expand Down
3 changes: 2 additions & 1 deletion packages/entities/entities-consumers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"errorLimit": "500KB"
},
"dependencies": {
"@kong-ui-public/entities-shared": "workspace:^"
"@kong-ui-public/entities-shared": "workspace:^",
"@kong/icons": "^1.9.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-consumer"
icon="plus"
size="large"
:to="config.consumerGroupId ? undefined : config.createRoute"
@click="() => config.consumerGroupId ? handleAddConsumerClick() : undefined"
>
<AddIcon />
{{ config.consumerGroupId ? t('consumers.actions.add_consumer') : t('consumers.list.toolbar_actions.new_consumer') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -181,6 +181,7 @@ import type { PropType } from 'vue'
import { computed, ref, watch, onBeforeMount } from 'vue'
import type { AxiosError } from 'axios'
import { useRouter } from 'vue-router'
import { AddIcon } from '@kong/icons'
import composables from '../composables'
import endpoints from '../consumers-endpoints'
import {
Expand Down
3 changes: 2 additions & 1 deletion packages/entities/entities-gateway-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"errorLimit": "600KB"
},
"dependencies": {
"@kong-ui-public/entities-shared": "workspace:^"
"@kong-ui-public/entities-shared": "workspace:^",
"@kong/icons": "^1.9.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-gateway-service"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t('gateway_services.list.toolbar_actions.new_gateway_service') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -165,6 +165,7 @@
import type { PropType } from 'vue'
import { computed, ref, watch, onBeforeMount } from 'vue'
import { useRouter } from 'vue-router'
import { AddIcon } from '@kong/icons'
import composables from '../composables'
import endpoints from '../gateway-services-endpoints'
import type { AxiosError } from 'axios'
Expand Down
3 changes: 2 additions & 1 deletion packages/entities/entities-key-sets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"errorLimit": "500KB"
},
"dependencies": {
"@kong-ui-public/entities-shared": "workspace:^"
"@kong-ui-public/entities-shared": "workspace:^",
"@kong/icons": "^1.9.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-key-set"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t('keySets.list.toolbar_actions.new_key_set') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -132,6 +132,7 @@
import type { PropType } from 'vue'
import { computed, ref, watch, onBeforeMount } from 'vue'
import type { AxiosError } from 'axios'
import { AddIcon } from '@kong/icons'
import { useRouter } from 'vue-router'
import composables from '../composables'
import endpoints from '../key-sets-endpoints'
Expand Down
3 changes: 2 additions & 1 deletion packages/entities/entities-keys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"errorLimit": "486KB"
},
"dependencies": {
"@kong-ui-public/entities-shared": "workspace:^"
"@kong-ui-public/entities-shared": "workspace:^",
"@kong/icons": "^1.9.1"
}
}
3 changes: 2 additions & 1 deletion packages/entities/entities-keys/src/components/KeyList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-key"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t('keys.list.toolbar_actions.new_key') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -137,6 +137,7 @@ import type { PropType } from 'vue'
import { computed, ref, watch, onBeforeMount } from 'vue'
import type { AxiosError } from 'axios'
import { useRouter } from 'vue-router'
import { AddIcon } from '@kong/icons'
import composables from '../composables'
import endpoints from '../keys-endpoints'
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-plugin"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t('plugins.list.toolbar_actions.new_plugin') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -246,6 +246,7 @@ import type {
FuzzyMatchFilterConfig,
TableErrorMessage,
} from '@kong-ui-public/entities-shared'
import { AddIcon } from '@kong/icons'
import composables from '../composables'
import endpoints from '../plugins-endpoints'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-route"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t('routes.list.toolbar_actions.new_route') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -193,6 +193,7 @@ import { useRouter } from 'vue-router'
import { BadgeMethodAppearances } from '@kong/kongponents'
import type { BadgeMethodAppearance, HeaderTag } from '@kong/kongponents'
import { AddIcon } from '@kong/icons'
import {
EntityBaseTable,
EntityDeleteModal,
Expand Down
3 changes: 2 additions & 1 deletion packages/entities/entities-snis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"errorLimit": "400KB"
},
"dependencies": {
"@kong-ui-public/entities-shared": "workspace:^"
"@kong-ui-public/entities-shared": "workspace:^",
"@kong/icons": "^1.9.1"
}
}
3 changes: 2 additions & 1 deletion packages/entities/entities-snis/src/components/SniList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-sni"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t('snis.list.toolbar_actions.new') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -159,6 +159,7 @@ import type {
TableErrorMessage,
} from '@kong-ui-public/entities-shared'
import '@kong-ui-public/entities-shared/dist/style.css'
import { AddIcon } from '@kong/icons'
const emit = defineEmits<{
(e: 'error', error: AxiosError): void,
Expand Down
3 changes: 2 additions & 1 deletion packages/entities/entities-upstreams-targets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"errorLimit": "900KB"
},
"dependencies": {
"@kong-ui-public/entities-shared": "workspace:^"
"@kong-ui-public/entities-shared": "workspace:^",
"@kong/icons": "^1.9.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-new-target"
icon="plus"
:to="props.config.createRoute ? props.config.createRoute : undefined"
@click="() => !props.config.createRoute ? handleCreateTarget() : undefined"
>
<AddIcon />
{{ t('targets.list.toolbar_actions.new_target') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -153,6 +153,7 @@ import {
import type { PropType } from 'vue'
import { computed, onBeforeMount, ref, watch } from 'vue'
import type { AxiosError } from 'axios'
import { AddIcon } from '@kong/icons'
import type {
KongManagerTargetsListConfig,
KonnectTargetsListConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-upstream"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t('upstreams.list.toolbar_actions.new_upstream') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -138,6 +138,7 @@ import type { PropType } from 'vue'
import { computed, onBeforeMount, ref, watch } from 'vue'
import type { AxiosError } from 'axios'
import { useRouter } from 'vue-router'
import { AddIcon } from '@kong/icons'
import type {
KongManagerUpstreamsListConfig,
KonnectUpstreamsListConfig,
Expand Down
3 changes: 2 additions & 1 deletion packages/entities/entities-vaults/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"errorLimit": "900KB"
},
"dependencies": {
"@kong-ui-public/entities-shared": "workspace:^"
"@kong-ui-public/entities-shared": "workspace:^",
"@kong/icons": "^1.9.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
v-show="hasData"
appearance="primary"
data-testid="toolbar-add-vault"
icon="plus"
size="large"
:to="config.createRoute"
>
<AddIcon />
{{ t('vaults.list.toolbar_actions.new_vault') }}
</KButton>
</PermissionsWrapper>
Expand Down Expand Up @@ -137,6 +137,7 @@ import type { PropType } from 'vue'
import { computed, ref, watch, onBeforeMount } from 'vue'
import { useRouter } from 'vue-router'
import type { AxiosError } from 'axios'
import { AddIcon } from '@kong/icons'
import {
EntityBaseTable,
Expand Down
Loading

0 comments on commit bb1756c

Please sign in to comment.