mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-21 06:31:28 +02:00
remove selection state handling from image block in examples
This commit is contained in:
@@ -16,12 +16,10 @@ import { Map } from 'immutable'
|
|||||||
const NODES = {
|
const NODES = {
|
||||||
image: (props) => {
|
image: (props) => {
|
||||||
const { node, state } = props
|
const { node, state } = props
|
||||||
const { data } = node
|
const src = node.data.get('src')
|
||||||
const isActive = state.isFocused && state.blocks.includes(node)
|
|
||||||
const src = data.get('src')
|
|
||||||
return (
|
return (
|
||||||
<Void {...props} className="image-block">
|
<Void {...props} className="image-block">
|
||||||
<img {...props.attributes} src={src} data-active={isActive} />
|
<img {...props.attributes} src={src} />
|
||||||
</Void>
|
</Void>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user