Norsk Tipping Design System

TeaserCard

Install

yarn add @ntds/media-card

Import

import { TeaserCard } from '@ntds/media-card';

Props

PropTypeDefaultDescription
backgroundColorstringhex value for card background color
textColor?stringhex value for text color
footer?{ message?: string; logo?: { name: string; title: string; }; button?: { url: string; label: string; onClick?: () => void; }; colorTint: string; legalText?: string; }footer
media?MediaTypemedia
link?{ url: string; label: string; onClick?: () => void; }Card link
linkComponent?ComponentType<LinkComponent>The component to use for rendering links. Typically, this is a React Router Link component and only needs to be set in OmniWeb since the links are SPA-links inside OmniWeb. If not defined (default), the component will render a regular anchor tag.
renderImage?(className: string, media: MediaImage) => ReactNodeProvide a function that renders the image. Example: ```jsx renderImage={(classNames) => ( <img className={classNames} alt='' src='my-image.jpg' /> )}

On this page