ExpandableIndex.tsx 594 Bytes
Newer Older
1
import * as React from 'react';
2
import { DetailsRow, IDetailsRowBaseProps } from '@fluentui/react/lib/DetailsList';
3
4
5
import OpenRow from './OpenRow';
import '@style/table.scss';

6
7
8
9
10
11
interface ExpandableDetailsProps {
    detailsProps: IDetailsRowBaseProps;
    isExpand: boolean;
}

const ExpandableDetails = (props: ExpandableDetailsProps): any => {
12
13
14
15
16
17
18
19
20
21
    const { detailsProps, isExpand } = props;
    return (
        <div>
            <DetailsRow {...detailsProps} />
            {isExpand && <OpenRow trialId={detailsProps.item.id} />}
        </div>
    );
};

export default ExpandableDetails;