slate-prop-types
import Types from 'slate-prop-types'A set of React prop types for Slate editors and plugins.
Example
import React from 'react'
import Types from 'slate-prop-types'
class Toolbar extends React.Component {
propTypes = {
block: Types.block,
schema: Types.schema.isRequired,
value: Types.value.isRequired,
}
...
}Exports
block
blockEnsure that a value is a Slate Block.
blocks
blocksEnsure that a value is an immutable List of Slate Block objects.
change
changeEnsure that a value is a Slate Change.
character
characterEnsure that a value is a Slate Character.
characters
charactersEnsure that a value is an immutable List of Slate Character objects.
data
dataEnsure that a value is a Slate Data.
document
documentEnsure that a value is a Slate Document.
history
historyEnsure that a value is a Slate History.
inline
inlineEnsure that a value is a Slate Inline.
inlines
inlinesEnsure that a value is an immutable List of Slate Inline objects.
leaf
leafEnsure that a value is a Slate Leaf.
leaves
leavesEnsure that a value is an immutable List of Slate Leaf objects.
mark
markEnsure that a value is a Slate Mark.
marks
marksEnsure that a value is an immutable Set of Slate Mark objects.
node
nodeEnsure that a value is a Slate Node.
nodes
nodesEnsure that a value is an immutable List of Slate Node objects.
range
rangeEnsure that a value is a Slate Range.
ranges
rangesEnsure that a value is an immutable List of Slate Range objects.
schema
schemaEnsure that a value is a Slate Schema.
stack
stackEnsure that a value is a Slate Stack.
text
textEnsure that a value is a Slate Text.
texts
textsEnsure that a value is an immutable List of Slate Text objects.
value
valueEnsure that a value is a Slate Value.
Last updated