1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-19 05:31:56 +02:00

remove selection state handling from image block in examples

This commit is contained in:
Ian Storm Taylor
2016-07-22 13:28:38 -07:00
parent 58de623ffc
commit 31782cb11a

View File

@@ -16,12 +16,10 @@ import { Map } from 'immutable'
const NODES = {
image: (props) => {
const { node, state } = props
const { data } = node
const isActive = state.isFocused && state.blocks.includes(node)
const src = data.get('src')
const src = node.data.get('src')
return (
<Void {...props} className="image-block">
<img {...props.attributes} src={src} data-active={isActive} />
<img {...props.attributes} src={src} />
</Void>
)
}