Skip to content

Commit

Permalink
tell ChildDecorator whether variant is text or icon
Browse files Browse the repository at this point in the history
  • Loading branch information
mmadariaga committed Feb 5, 2024
1 parent 866ae4d commit b37c917
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@irontec/ivoz-ui",
"version": "1.1.20",
"version": "1.1.21",
"description": "UI library used in ivozprovider",
"license": "GPL-3.0",
"main": "index.js",
Expand Down
2 changes: 2 additions & 0 deletions library/src/components/List/Content/Card/ContentCardBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const ContentCardBody = (props: ContentCardProps): JSX.Element => {
detail={
showDetail && (
<ChildDecorator
variant='icon'
routeMapItem={detailMapItem}
row={row}
entityService={entityService}
Expand All @@ -130,6 +131,7 @@ const ContentCardBody = (props: ContentCardProps): JSX.Element => {
edit={
(acl.update || !showDetail) && (
<ChildDecorator
variant='icon'
routeMapItem={updateRouteMapItem}
row={row}
entityService={entityService}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const ChildEntityLinks = (props: ChildEntityLinksProps): JSX.Element => {

return (
<ChildDecorator
variant='icon'
key={key}
routeMapItem={routeMapItem}
row={row}
Expand All @@ -76,6 +77,7 @@ const ChildEntityLinks = (props: ChildEntityLinksProps): JSX.Element => {
})}
{childEntitiesCopy.length === 0 && deleteMapItem && (
<ChildDecorator
variant='icon'
routeMapItem={deleteMapItem}
row={row}
entityService={entityService}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const MoreChildEntityLinks = (props: MoreChildEntityLinksProps) => {
<MoreMenuItem key={key}>
<ChildDecorator
key={key}
variant='text'
routeMapItem={routeMapItem}
row={row}
entityService={entityService}
Expand All @@ -82,6 +83,7 @@ export const MoreChildEntityLinks = (props: MoreChildEntityLinksProps) => {
})}
{deleteMapItem && (
<ChildDecorator
variant='text'
routeMapItem={deleteMapItem}
row={row}
entityService={entityService}
Expand Down
2 changes: 2 additions & 0 deletions library/src/components/List/Content/Table/ContentTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ const ContentTable = (props: ContentTableProps): JSX.Element => {
detail={
showDetail && (
<ChildDecorator
variant='icon'
routeMapItem={detailMapItem}
row={row}
entityService={entityService}
Expand All @@ -164,6 +165,7 @@ const ContentTable = (props: ContentTableProps): JSX.Element => {
edit={
(acl.update || !showDetail) && (
<ChildDecorator
variant='icon'
routeMapItem={updateRouteMapItem}
row={row}
entityService={entityService}
Expand Down
1 change: 1 addition & 0 deletions library/src/entities/EntityInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface ChildDecoratorProps {
routeMapItem: RouteMapItem;
row: Record<string, any>;
entityService: EntityService;
variant: 'icon' | 'text';
disabled?: boolean | undefined;
}

Expand Down

0 comments on commit b37c917

Please sign in to comment.