Skip to content

Commit

Permalink
[form-builder] Remove use of Layer in BlockExtras
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard committed Feb 4, 2021
1 parent 40351fd commit 4b102a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
box-sizing: border-box;
position: relative;
overflow: hidden;
z-index: var(--zindex-portal);
}

.content {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {useZIndex} from '@sanity/base/components'
import {Layer} from '@sanity/ui'
import React from 'react'
import classNames from 'classnames'
import {ChangeIndicatorWithProvidedFullPath} from '@sanity/base/lib/change-indicators'
Expand All @@ -24,7 +22,6 @@ type Props = {
}
export default function BlockExtras(props: Props) {
const editor = usePortableTextEditor()
const zindex = useZIndex()
const {block, blockActions, height, isFullscreen, markers, onFocus, renderCustomMarkers} = props
const blockValidation = getValidationMarkers(markers)
const errors = blockValidation.filter((mrkr) => mrkr.level === 'error')
Expand Down Expand Up @@ -65,18 +62,17 @@ export default function BlockExtras(props: Props) {
content
)
return (
<Layer
<div
className={classNames([
styles.root,
hasFocus && styles.hasFocus,
isFullscreen && styles.hasFullScreen,
errors.length > 0 && styles.withError,
warnings.length > 0 && !errors.length && styles.withWarning,
])}
zOffset={zindex.portal}
>
{returned}
</Layer>
</div>
)
}

Expand Down

2 comments on commit 4b102a2

@vercel
Copy link

@vercel vercel bot commented on 4b102a2 Feb 4, 2021

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

test-studio – ./

test-studio.now.sh
test-studio.sanity.build
test-studio-git-next.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 4b102a2 Feb 4, 2021

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

perf-studio – ./

perf-studio.sanity.build
perf-studio-git-next.sanity.build

Please sign in to comment.