mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-12 12:51:38 -05:00
182e9859ec
[web] Welcome page migration GitOrigin-RevId: 2469786372df24d579d1987cf5bb1113450e9d78
29 lines
830 B
TypeScript
29 lines
830 B
TypeScript
import Table from '@/features/ui/components/bootstrap-5/table'
|
|
import { Table as BS3Table } from 'react-bootstrap'
|
|
import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
|
|
|
|
type OLFormProps = React.ComponentProps<typeof Table> & {
|
|
bs3Props?: React.ComponentProps<typeof BS3Table>
|
|
}
|
|
|
|
function OLTable(props: OLFormProps) {
|
|
const { bs3Props, ...rest } = props
|
|
|
|
const bs3FormProps: React.ComponentProps<typeof BS3Table> = {
|
|
bsClass: rest.className,
|
|
condensed: rest.size === 'sm',
|
|
children: rest.children,
|
|
responsive:
|
|
typeof rest.responsive !== 'string' ? rest.responsive : undefined,
|
|
...bs3Props,
|
|
}
|
|
|
|
return (
|
|
<BootstrapVersionSwitcher
|
|
bs3={<BS3Table {...bs3FormProps} />}
|
|
bs5={<Table {...rest} />}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default OLTable
|