Commit 060b73e1 authored by Robert Knight's avatar Robert Knight

Document `AnnotationBody` and `AnnotationQuote` props

parent d1485d0b
......@@ -46,13 +46,50 @@ function AnnotationBody({
}
AnnotationBody.propTypes = {
/**
* Whether to limit the height of the annotation body if it is tall.
*/
collapse: propTypes.bool,
/**
* If the
*/
hasContent: propTypes.bool,
/**
* Whether to display the body in edit mode (if true) or view mode.
*/
isEditing: propTypes.bool,
/**
* `true` if the contents of this annotation body have been redacted by
* a moderator.
*/
isHiddenByModerator: propTypes.bool,
/**
* Callback invoked when the height of the rendered annotation body increases
* above or falls below the threshold at which the `collapse` prop will affect
* it.
*/
onCollapsibleChanged: propTypes.func,
/**
* Callback invoked when the user edits the content of the annotation body
* when `isEditing` is true.
*/
onEditText: propTypes.func,
/**
* Callback invoked when the user clicks a space in a truncated annotation
* body to indicate that they want to see the rest of the content.
*/
onToggleCollapsed: propTypes.func,
/**
* The markdown annotation body, which is either rendered as HTML (if `isEditing`
* is false) or displayed in a text area otherwise.
*/
text: propTypes.string,
};
......
......@@ -33,7 +33,16 @@ function AnnotationQuote({ isOrphan, quote, settings = {} }) {
}
AnnotationQuote.propTypes = {
/**
* If `true`, display an indicator that the annotated text was not found in
* the current version of the document.
*/
isOrphan: propTypes.bool,
/**
* The text that the annotation refers to. This is rendered as plain text
* (ie. HTML tags are rendered literally).
*/
quote: propTypes.string,
// Used for theming.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment