UNPKG

tharikida-ui

Version:

A modern, lightweight React UI component library with built-in theming, accessibility, and full TypeScript support. Create beautiful, responsive, and customizable web apps faster with ready-to-use components for any project.

97 lines (96 loc) 6.58 kB
import React from "react"; /** * `Table` is a flexible table component for displaying tabular data, supporting theming and custom styles. * * @param {object} props - The properties to customize the `Table` component. * @param {string[]} props.columns - Table column headers. * @param {(string | number | React.ReactNode)[][]} props.data - Table data as array of rows. * @param {React.CSSProperties} [props.styles] - Custom styles for the table. * @param {string} [props.className] - Additional className for the table. * @param {number} [props.cornerRadius] - Border radius for the table. Overrides theme.cornerRadius if provided. * @param {string} [props.primaryColor] - Primary color for the table. Overrides theme.primaryColor if provided. * @param {string} [props.secondaryColor] - Secondary color for the table. Overrides theme.secondaryColor if provided. * @param {string} [props.textColor] - Text color for the table. Overrides theme.textColor if provided. * @param {string} [props.backgroundColor] - Background color for the table. Overrides theme.backgroundColor if provided. * @param {number} [props.fontSize] - Font size for the table. Overrides theme.fontSize if provided. * @param {string} [props.fontFamily] - Font family for the table. Overrides theme.fontFamily if provided. * @param {number} [props.spacingfactor] - Spacing factor for the table. Overrides theme.spacingfactor if provided. * @param {string} [props.borderColor] - Border color for the table. Overrides theme.borderColor if provided. * @param {string} [props.shadowColor] - Shadow color for the table. Overrides theme.shadowColor if provided. * @param {string} [props.borderWidth] - Border width for the table. Overrides theme.borderWidth if provided. * @param {string} [props.borderStyle] - Border style for the table. Overrides theme.borderStyle if provided. * @param {string} [props.fontWeight] - Font weight for the table. Overrides theme.fontWeight if provided. * @param {string} [props.lineHeight] - Line height for the table. Overrides theme.lineHeight if provided. * @param {string} [props.letterSpacing] - Letter spacing for the table. Overrides theme.letterSpacing if provided. * @param {string} [props.transitionDuration] - Transition duration for the table. Overrides theme.transitionDuration if provided. * @param {string} [props.padding] - Padding for the table. Overrides theme.padding if provided. * @param {string} [props.margin] - Margin for the table. Overrides theme.margin if provided. * @param {string} [props.shadowOffsetX] - Shadow offset X for the table. Overrides theme.shadowOffsetX if provided. * @param {string} [props.shadowOffsetY] - Shadow offset Y for the table. Overrides theme.shadowOffsetY if provided. * @param {string} [props.shadowBlur] - Shadow blur for the table. Overrides theme.shadowBlur if provided. * @param {string} [props.shadowSpread] - Shadow spread for the table. Overrides theme.shadowSpread if provided. * @param {boolean} [props.shadowInset] - Shadow inset for the table. Overrides theme.shadowInset if provided. * @param {string} [props.hoverColor] - Hover color for the table. Overrides theme.hoverColor if provided. * * @returns {JSX.Element} A styled table component. */ export interface TableProps { /** Table column headers */ columns: string[]; /** Table data as array of rows */ data: (string | number | React.ReactNode)[][]; /** Custom styles for the table */ styles?: React.CSSProperties; /** Additional className for the table */ className?: string; /** Border radius for the table. Overrides theme.cornerRadius if provided. */ cornerRadius?: number; /** Primary color for the table. Overrides theme.primaryColor if provided. */ primaryColor?: string; /** Secondary color for the table. Overrides theme.secondaryColor if provided. */ secondaryColor?: string; /** Text color for the table. Overrides theme.textColor if provided. */ textColor?: string; /** Background color for the table. Overrides theme.backgroundColor if provided. */ backgroundColor?: string; /** Font size for the table. Overrides theme.fontSize if provided. */ fontSize?: number; /** Font family for the table. Overrides theme.fontFamily if provided. */ fontFamily?: string; /** Spacing factor for the table. Overrides theme.spacingfactor if provided. */ spacingfactor?: number; /** Border color for the table. Overrides theme.borderColor if provided. */ borderColor?: string; /** Shadow color for the table. Overrides theme.shadowColor if provided. */ shadowColor?: string; /** Border width for the table. Overrides theme.borderWidth if provided. */ borderWidth?: string; /** Border style for the table. Overrides theme.borderStyle if provided. */ borderStyle?: string; /** Font weight for the table. Overrides theme.fontWeight if provided. */ fontWeight?: string; /** Line height for the table. Overrides theme.lineHeight if provided. */ lineHeight?: string; /** Letter spacing for the table. Overrides theme.letterSpacing if provided. */ letterSpacing?: string; /** Transition duration for the table. Overrides theme.transitionDuration if provided. */ transitionDuration?: string; /** Padding for the table. Overrides theme.padding if provided. */ padding?: string; /** Margin for the table. Overrides theme.margin if provided. */ margin?: string; /** Shadow offset X for the table. Overrides theme.shadowOffsetX if provided. */ shadowOffsetX?: string; /** Shadow offset Y for the table. Overrides theme.shadowOffsetY if provided. */ shadowOffsetY?: string; /** Shadow blur for the table. Overrides theme.shadowBlur if provided. */ shadowBlur?: string; /** Shadow spread for the table. Overrides theme.shadowSpread if provided. */ shadowSpread?: string; /** Shadow inset for the table. Overrides theme.shadowInset if provided. */ shadowInset?: boolean; /** Hover color for the table. Overrides theme.hoverColor if provided. */ hoverColor?: string; } declare const Table: ({ columns, data, styles, className, cornerRadius, primaryColor, secondaryColor, textColor, backgroundColor, fontSize, fontFamily, spacingfactor, borderColor, shadowColor, borderWidth, borderStyle, fontWeight, lineHeight, letterSpacing, transitionDuration, padding, margin, shadowOffsetX, shadowOffsetY, shadowBlur, shadowSpread, shadowInset, hoverColor, }: TableProps) => import("react/jsx-runtime").JSX.Element; export default Table;