desktop selection
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
import React from 'react';
|
||||
import { ArrowUpIcon } from '../ui/icons';
|
||||
|
||||
export const createWorkspaceSurfaceConfig = ({
|
||||
title,
|
||||
subtitle = null,
|
||||
sidebarToggle = null,
|
||||
parentBreadcrumb = null,
|
||||
onNavigateParent = null,
|
||||
actions = null,
|
||||
breadcrumbs = null,
|
||||
content = null,
|
||||
@@ -14,25 +11,10 @@ export const createWorkspaceSurfaceConfig = ({
|
||||
variant = 'documents',
|
||||
key = 'documents',
|
||||
}) => {
|
||||
const showParent = parentBreadcrumb && typeof onNavigateParent === 'function';
|
||||
|
||||
const parentControl = showParent ? (
|
||||
<button
|
||||
type="button"
|
||||
className="icon-button"
|
||||
onClick={onNavigateParent}
|
||||
aria-label="Go to parent folder"
|
||||
title="Go to parent folder"
|
||||
>
|
||||
<ArrowUpIcon />
|
||||
</button>
|
||||
) : null;
|
||||
|
||||
const leading = sidebarToggle || parentControl
|
||||
const leading = sidebarToggle
|
||||
? (
|
||||
<>
|
||||
{sidebarToggle}
|
||||
{parentControl}
|
||||
</>
|
||||
)
|
||||
: null;
|
||||
|
||||
Reference in New Issue
Block a user