Skip to content

Commit

Permalink
fix(form-builder): make the Paste-text on file & image input fade i…
Browse files Browse the repository at this point in the history
…n/out on focus/blur
  • Loading branch information
bjoerge committed Mar 4, 2021
1 parent e7d50e6 commit b79cec2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import {Box, Flex, Heading, Text} from '@sanity/ui'
import styled from 'styled-components'
import {FileTarget} from './styles'

const ClipboardBox = styled(Box)`
type UploadPlaceholderProps = {
fileType?: string
}

const ClipboardBox = styled(Box)<{canPaste?: boolean}>`
opacity: 0.25;
${FileTarget}:focus & {
opacity: 1;
Expand All @@ -13,10 +17,6 @@ const ClipboardBox = styled(Box)`
transition-duration: 100ms;
`

type UploadPlaceholderProps = {
fileType?: string
}

export default React.memo(function UploadPlaceholder({fileType = 'file'}: UploadPlaceholderProps) {
return (
<Flex height="fill" align="center" justify="center">
Expand Down

0 comments on commit b79cec2

Please sign in to comment.