Commit aacf19f7 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Convert AnnotationReplyToggle to TS

parent 145cf93d
import { LinkButton } from '@hypothesis/frontend-shared';
/**
* @typedef AnnotationReplyToggleProps
* @prop {() => void} onToggleReplies
* @prop {number} replyCount
* @prop {boolean} threadIsCollapsed
*/
export type AnnotationReplyToggleProps = {
onToggleReplies: () => void;
replyCount: number;
threadIsCollapsed: boolean;
};
/**
* Render a thread-card control to toggle (expand or collapse) all of this
* thread's children.
*
* @param {AnnotationReplyToggleProps} props
*/
function AnnotationReplyToggle({
onToggleReplies,
replyCount,
threadIsCollapsed,
}) {
}: AnnotationReplyToggleProps) {
const toggleAction = threadIsCollapsed ? 'Show replies' : 'Hide replies';
const toggleText = `${toggleAction} (${replyCount})`;
......
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