UNPKG

@fchh/fcos-suite-ui

Version:

Reusable UI components based on React and TailwindCSS for the Fab City OS Suite (initially funded by the Interfacer EU project).

59 lines (58 loc) 1.46 kB
export interface INews { id: number; title: string; description: string; image: INewsImage; date: string; category: INewsCategory; time?: string; location?: string; href: string; type?: "dark" | "light"; customBackgroundColor?: string; textColor?: "dark" | "light"; externalTitle?: string; } export interface INewsCategory { id: number; title: string; href?: string; } export interface INewsImage { alt: string; src: string; } export interface INewsCategory { id: number; title: string; } type RGB = `rgb(${number}, ${number}, ${number})`; type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`; type HEX = `#${string}`; type HSL = `hsl(${number}, ${number}%, ${number}%)`; type HSLA = `hsla(${number}, ${number}%, ${number}%, ${number})`; export type Color = RGB | RGBA | HEX | HSL | HSLA; type NewsCardBaseProps = { image: INewsImage; title: string; description: string; date?: string; location?: string; category?: INewsCategory; href: string; className?: string; externalLinkIndicator?: string; newTab?: boolean; id?: string; }; type NewsCardCustomColor = { variant?: never; customBackgroundColor?: Color; textColor?: "dark" | "light"; } | { variant: "light" | "dark"; customBackgroundColor?: never; textColor?: never; }; export type INewsCard = NewsCardBaseProps & NewsCardCustomColor; export {};