diff --git a/client/src/components/_common/SectionMessage/SectionMessage.js b/client/src/components/_common/SectionMessage/SectionMessage.js index 503945323..4fbb30ea4 100644 --- a/client/src/components/_common/SectionMessage/SectionMessage.js +++ b/client/src/components/_common/SectionMessage/SectionMessage.js @@ -4,10 +4,29 @@ import Message from '_common/Message'; /** * Show an event-based message to the user - * @todo Document examples * @example - * // Blah blah… - * + * // Basic usage + * Uh oh. + * @example + * // Manage onDismiss via props + * // CAVEAT: Available through `` but (maybe) not `` + * ... + * const [isVisible, setIsVisible] = useState(...); + * + * const onDismiss = useCallback(() => { + * setIsVisible(!isVisible); + * }, [isVisible]); + * + * return ( + * + * Uh oh. + * + * ); + * ... */ const SectionMessage = props => { const [isVisible, setIsVisible] = useState(true);