Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #390 from deriv-com/meenu-add-target-prop-for-link
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv authored Mar 11, 2024
2 parents d8abdec + deb46b5 commit 95408e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/components/src/lib/card/base/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export const BaseCard: React.FC<BaseCardProps> = ({
size="md"
descriptiveText={link?.descriptiveText}
hasIcon
target={link?.target || '_self'}
>
{link.content}
</CustomLink>
Expand Down
2 changes: 2 additions & 0 deletions libs/components/src/lib/card/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export type StatCardVariant = 'white' | 'dark' | 'coral';
export type CardColorVariant = 'light' | 'gray';
export type CardAlignVariant = 'start' | 'center';
export type CardSizeVariant = 'xs' | 'sm' | 'md' | 'lg';
export type CardLinkTargetVariant = '_blank' | '_self' | '_parent' | '_top';

interface BaseCardContent {
header?: ReactNode;
Expand All @@ -14,6 +15,7 @@ interface LinkProps {
content: ReactNode;
href: string;
descriptiveText?: string;
target?: CardLinkTargetVariant;
}

export interface StatCardContent extends BaseCardContent {
Expand Down

0 comments on commit 95408e2

Please sign in to comment.