github
1387 of 2823 branches covered (49.13%)
6 of 1033 new or added lines in 43 files covered. (0.58%)
34 existing lines in 5 files now uncovered.14088 of 80281 relevant lines covered (17.55%)
1.74 hits per line
NEW
|
import { Sheet, SheetContent } from '@teable/ui-lib'; |
|
2 |
import { type FC, type PropsWithChildren } from 'react'; |
× |
3 |
import { Modal } from './Modal'; |
× |
4 |
import { ExpandRecordModel } from './type'; |
× |
5 |
|
× |
6 |
export const ExpandRecordWrap: FC< |
× |
7 |
PropsWithChildren<{ |
× |
8 |
model?: ExpandRecordModel; |
× |
9 |
visible?: boolean; |
× |
10 |
onClose?: () => void;
|
× |
11 |
}> |
× |
12 |
> = (props) => { |
× |
NEW
|
const { children, model, visible, onClose } = props;
|
× |
14 |
|
× |
15 |
if (model === ExpandRecordModel.Modal)
|
× |
16 |
return (
|
× |
NEW
|
<Modal visible={visible} onClose={onClose}> |
× |
18 |
{children} |
× |
19 |
</Modal> |
× |
20 |
); |
× |
NEW
|
|
× |
NEW
|
return (
|
× |
NEW
|
<Sheet modal={true} open={visible} onOpenChange={onClose}>
|
× |
NEW
|
<SheetContent |
× |
NEW
|
className="h-5/6 overflow-hidden rounded-t-lg p-0"
|
× |
NEW
|
side="bottom"
|
× |
NEW
|
closeable={false}
|
× |
NEW
|
> |
× |
NEW
|
{children} |
× |
NEW
|
</SheetContent> |
× |
NEW
|
</Sheet> |
× |
NEW
|
); |
× |
UNCOV
33
|
}; |
× |