Add "overlay" sidebar position to MaterDetail
Summary: Project: https://docs.google.com/document/d/1x-1ShlxXCM2od9JMO6PP14Cuqq0OrVe1Qd7FUwTos9A/edit Reviewed By: ivanmisuno Differential Revision: D44706158 fbshipit-source-id: 16c70a7c9a414a6c32d690eb05ae5b08818dd400
This commit is contained in:
committed by
Facebook GitHub Bot
parent
985a9eda33
commit
794c29f320
@@ -41,7 +41,7 @@ type MasterDetailProps<T> = {
|
|||||||
* 'bottom': show a resizable pane to the bottom
|
* 'bottom': show a resizable pane to the bottom
|
||||||
* 'none': don't show details at all
|
* 'none': don't show details at all
|
||||||
*/
|
*/
|
||||||
sidebarPosition?: 'bottom' | 'right' | 'main' | 'none';
|
sidebarPosition?: 'bottom' | 'right' | 'main' | 'overlay' | 'none';
|
||||||
/**
|
/**
|
||||||
* Component that accepts a 'record' prop that is used to render details.
|
* Component that accepts a 'record' prop that is used to render details.
|
||||||
* If none is provided, a standard `DataInspector` component will be used to display the entire record.
|
* If none is provided, a standard `DataInspector` component will be used to display the entire record.
|
||||||
@@ -245,6 +245,13 @@ export function MasterDetail<T extends object>({
|
|||||||
{sidebar}
|
{sidebar}
|
||||||
</Layout.Bottom>
|
</Layout.Bottom>
|
||||||
);
|
);
|
||||||
|
case 'overlay':
|
||||||
|
return (
|
||||||
|
<Layout.Container grow style={{position: 'relative'}}>
|
||||||
|
{table}
|
||||||
|
{sidebar}
|
||||||
|
</Layout.Container>
|
||||||
|
);
|
||||||
case 'none':
|
case 'none':
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user