42 lines
673 B
JavaScript
42 lines
673 B
JavaScript
import React from 'react';
|
|
|
|
export const createWorkspaceSurfaceConfig = ({
|
|
title,
|
|
subtitle = null,
|
|
sidebarToggle = null,
|
|
actions = null,
|
|
breadcrumbs = null,
|
|
selectionLabel = null,
|
|
floatingActions = null,
|
|
content = null,
|
|
detail = null,
|
|
variant = 'documents',
|
|
key = 'documents',
|
|
}) => {
|
|
const leading = sidebarToggle
|
|
? (
|
|
<>
|
|
{sidebarToggle}
|
|
</>
|
|
)
|
|
: null;
|
|
|
|
return {
|
|
key,
|
|
variant,
|
|
header: {
|
|
title,
|
|
subtitle,
|
|
leading,
|
|
actions,
|
|
breadcrumbs,
|
|
selectionLabel,
|
|
floatingActions,
|
|
},
|
|
content,
|
|
detail,
|
|
};
|
|
};
|
|
|
|
export default createWorkspaceSurfaceConfig;
|