import React, { CSSProperties, FC, HTMLAttributes, ReactNode } from 'react' import classNames from 'classnames' import { Flex, FlexProps } from '../flex' import BoxPagination from './box_pagination' import { Pagination, PaginationProps } from '../pagination' interface BoxTableProps { info?: ReactNode action?: ReactNode className?: string style?: CSSProperties headerProps?: FlexProps pagination?: PaginationProps } type BoxTableInfoProps = HTMLAttributes const BoxTableInfo: FC = ({ className, ...rest }) => (
) const BoxTable: FC = ({ info, action, children, className, headerProps = {}, pagination, ...rest }) => { const { className: headerClassName } = headerProps return ( <>
{info} {action}
{children}
{pagination && ( )} ) } export { BoxTable, BoxTableInfo } export default BoxTable export type { BoxTableProps, BoxTableInfoProps }