@oslokommune/punkt-react
Version:
React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo
38 lines (37 loc) • 1.21 kB
TypeScript
import { HTMLAttributes, ReactNode, Ref } from 'react';
import { TCardSkin, TLayout, TTagSkin } from '../../shared-types';
export type { TCardSkin, TLayout };
type TCardPadding = 'none' | 'default';
type TCardImageShape = 'square' | 'round';
type TCardTagPosition = 'top' | 'bottom';
type THeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
interface ICardTag {
skin?: TTagSkin;
iconName?: string;
ariaLabel?: string;
text: string;
}
export interface IPktCard extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
ariaLabel?: string;
metaLead?: string | null;
borderOnHover?: boolean;
metaTrail?: string | null;
layout?: TLayout;
heading?: string;
headingLevel?: THeadingLevel;
image?: {
src: string;
alt: string;
};
imageShape?: TCardImageShape;
clickCardLink?: string | null;
padding?: TCardPadding;
openLinkInNewTab?: boolean;
skin?: TCardSkin;
subheading?: string;
tagPosition?: TCardTagPosition;
tags?: ICardTag[];
children?: ReactNode;
ref?: Ref<HTMLDivElement>;
}
export declare const PktCard: import('react').ForwardRefExoticComponent<Omit<IPktCard, "ref"> & import('react').RefAttributes<HTMLDivElement>>;