Commit 09ff0e7f authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Update shared components in `Annotation`

parent 3bf039a0
import { Actions, Spinner } from '@hypothesis/frontend-shared'; import { CardActions, Spinner } from '@hypothesis/frontend-shared/lib/next';
import classnames from 'classnames'; import classnames from 'classnames';
import { useMemo } from 'preact/hooks'; import { useMemo } from 'preact/hooks';
...@@ -45,15 +45,13 @@ function SavingMessage() { ...@@ -45,15 +45,13 @@ function SavingMessage() {
)} )}
data-testid="saving-message" data-testid="saving-message"
> >
<Spinner <span
classes={classnames( // Slowly fade in the Spinner such that it only shows up if the saving
'text-xl', // is slow
// Slowly fade in the Spinner such that it only shows up if className="text-xl animate-fade-in-slow"
// the saving is slow >
'animate-fade-in-slow' <Spinner size="sm" />
)} </span>
size="small"
/>
<div className="text-color-text-light font-medium">Saving...</div> <div className="text-color-text-light font-medium">Saving...</div>
</div> </div>
); );
...@@ -141,9 +139,9 @@ function Annotation({ ...@@ -141,9 +139,9 @@ function Annotation({
)} )}
{isSaving && <SavingMessage />} {isSaving && <SavingMessage />}
{showActions && ( {showActions && (
<Actions classes="grow"> <CardActions classes="grow">
<AnnotationActionBar annotation={annotation} onReply={onReply} /> <AnnotationActionBar annotation={annotation} onReply={onReply} />
</Actions> </CardActions>
)} )}
</footer> </footer>
)} )}
......
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