Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
060b73e1
Commit
060b73e1
authored
Nov 07, 2019
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document `AnnotationBody` and `AnnotationQuote` props
parent
d1485d0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
annotation-body.js
src/sidebar/components/annotation-body.js
+37
-0
annotation-quote.js
src/sidebar/components/annotation-quote.js
+9
-0
No files found.
src/sidebar/components/annotation-body.js
View file @
060b73e1
...
...
@@ -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
,
};
...
...
src/sidebar/components/annotation-quote.js
View file @
060b73e1
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment