import { type FC, type ReactNode } from 'react'

interface Props {
    text: string,
    children?: ReactNode,
    dir?: string,
}

const Td: FC<Props> = (props: Props) => {
    return (
        <td className='td' style={{ direction: props.dir === "ltr" ? "ltr" : "rtl" }}>
            {
                props.text ?
                    props.text
                    :
                    props.children
            }
        </td>
    )
}

export default Td