Skip to content

Commit

Permalink
[desk-tool] Wrap document pane with the Card component
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard authored and bjoerge committed Jan 19, 2021
1 parent 7eebdd0 commit f2c60f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/@sanity/desk-tool/package.json
Expand Up @@ -33,6 +33,7 @@
"@sanity/structure": "2.1.4",
"@sanity/types": "2.1.4",
"@sanity/util": "2.1.4",
"@sanity/ui": "^0.32.6",
"@sanity/uuid": "^3.0.1",
"boundless-arrow-key-navigation": "^1.1.0",
"classnames": "^2.2.5",
Expand Down
Expand Up @@ -3,8 +3,12 @@
.root {
background: var(--component-bg);
height: 100%;
display: flex;
flex-direction: column;

/* override @sanity/ui */
@nest &.root:not([hidden]) {
display: flex;
}
}

.headerContainer {
Expand Down
@@ -1,4 +1,5 @@
import {MenuItemGroup, BoundaryElementProvider} from '@sanity/base/__legacy/@sanity/components'
import {Card} from '@sanity/ui'
import classNames from 'classnames'
import {PortalProvider, usePortal} from 'part:@sanity/components/portal'
import {ScrollContainer} from 'part:@sanity/components/scroll'
Expand Down Expand Up @@ -112,7 +113,7 @@ export function DocumentPanel(props: DocumentPanelProps) {
const margins = screenIsNarrow ? narrowScreenMargins : DEFAULT_MARGINS

return (
<div className={classNames(styles.root, props.isCollapsed && styles.isCollapsed)}>
<Card className={classNames(styles.root, props.isCollapsed && styles.isCollapsed)}>
<div className={styles.headerContainer}>
<DocumentPanelHeader
activeViewId={props.activeViewId}
Expand Down Expand Up @@ -188,6 +189,6 @@ export function DocumentPanel(props: DocumentPanelProps) {
</div>
</BoundaryElementProvider>
</PortalProvider>
</div>
</Card>
)
}

1 comment on commit f2c60f0

@vercel
Copy link

@vercel vercel bot commented on f2c60f0 Jan 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.