phx-react
Version:
PHX REACT
79 lines (78 loc) • 2.1 kB
TypeScript
import React from 'react';
import Section from './Section';
import WrapSection from './WrapSection';
import Footer from './Footer';
import { ComplexAction } from '../types';
import { BannerWithCardProps } from '../BannerWithCard/BannerWithCard';
type DataListLiDouble = {
top: {
title: string;
data: {
name: string;
}[];
};
bottom: {
title: string;
data: {
name: string;
}[];
};
};
type Dropdown = {
title: string;
data: Array<{
name: string;
onClick(): void;
}>;
};
export interface CardProps {
title?: string;
children?: React.ReactNode;
primaryFooterAction?: ComplexAction;
primaryHeader?: boolean;
headerAction?: ComplexAction;
subSection?: Array<{
title?: string;
component?: any;
headerAction?: ComplexAction;
}>;
dataListLi?: Array<{
name?: string;
}>;
dropdown?: Dropdown;
dropdownOnly?: boolean;
iconDetail?: boolean;
isbuttonHeader?: boolean;
isUpload?: boolean;
dataListLiDouble?: DataListLiDouble;
secondaryFooterActions?: ComplexAction[];
dangerFooterAction?: ComplexAction;
type?: 'modal' | 'default' | 'title-with-badge';
isHeaderDownload?: boolean;
downloadLinkRef?: string;
hrefLink?: string;
downloadText?: string;
badgeType?: 'informational' | 'success' | 'warning' | 'danger' | 'default' | 'attention';
badgeText?: string;
fullSize?: boolean;
cardType?: 'card-component';
componentFist?: any;
componentLast?: any;
classNameFist?: any;
classNameLast?: any;
loadingSpinner?: boolean;
bannerConfig?: BannerWithCardProps;
bannerPosition?: 'top' | 'bottom';
subTitleConfig?: {
content: React.ReactNode | string;
className?: string;
};
dowloadIcon?: boolean;
footerBulkAction?: ComplexAction;
}
export declare const PHXCard: React.FunctionComponent<CardProps> & {
Section: typeof Section;
WrapSection: typeof WrapSection;
Footer: typeof Footer;
};
export {};