Skip to content

Commit

Permalink
Merge pull request #86 from eclipse-tractusx/feat/CPLP-3190/add-cards…
Browse files Browse the repository at this point in the history
…-image-element
  • Loading branch information
oyo authored Jan 26, 2024
2 parents ed82a84 + e28b783 commit c8ed680
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.1.21

- Add option to give an image element to Cards

## 2.1.20

- Add accordion actions functionality in accordions
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@catena-x/portal-shared-components",
"version": "2.1.20",
"version": "2.1.21",
"description": "Catena-X Portal Shared Components",
"author": "Catena-X Contributors",
"license": "Apache-2.0",
Expand Down
2 changes: 2 additions & 0 deletions src/components/content/Cards/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const Card = ({
imageSize,
imageShape,
imageLoader,
imageElement,
buttonText,
onClick,
onButtonClick,
Expand Down Expand Up @@ -243,6 +244,7 @@ export const Card = ({
imageSize={imageSize}
imageShape={imageShape}
imageLoader={imageLoader}
imageElement={imageElement}
preview={variant === 'preview'}
/>
{subscriptionStatus && (
Expand Down
4 changes: 2 additions & 2 deletions src/components/content/Cards/CardImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ export interface CardImageProps {
imageSize?: CardImageSize
imageShape?: CardImageShape
imageLoader?: (src: string) => Promise<ArrayBuffer>
preview?: boolean
imageElement?: JSX.Element
preview?: boolean
}

export const CardImage = ({
image,
imageSize = 'normal',
imageShape = 'round',
imageLoader,
preview = false,
imageElement,
preview = false,
}: CardImageProps) => {
const { transitions } = useTheme()
const withPreview = (size: number) => (preview ? size + 18 : size)
Expand Down
2 changes: 0 additions & 2 deletions src/components/content/Cards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export const Cards = ({
imageSize,
imageShape,
imageLoader,
imageElement,
columns = 6,
expandOnHover,
filledBackground,
Expand Down Expand Up @@ -97,7 +96,6 @@ export const Cards = ({
imageSize,
imageShape,
imageLoader,
imageElement,
expandOnHover,
filledBackground,
addButtonClicked,
Expand Down

0 comments on commit c8ed680

Please sign in to comment.