-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use SelectNext for import and export user selectors
- Loading branch information
Showing
7 changed files
with
174 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/sidebar/components/ShareDialog/UserAnnotationsListItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { UserAnnotations } from '../../helpers/annotations-by-user'; | ||
|
||
export type UserAnnotationsListItemProps = { | ||
userAnnotations: Omit<UserAnnotations, 'userid'>; | ||
}; | ||
|
||
/** | ||
* UserAnnotations representation to use inside `SelectNext.Option`. | ||
*/ | ||
export function UserAnnotationsListItem({ | ||
userAnnotations, | ||
}: UserAnnotationsListItemProps) { | ||
return ( | ||
<div className="flex gap-x-2"> | ||
{userAnnotations.displayName} | ||
<div className="rounded px-1 bg-grey-7 text-white"> | ||
{userAnnotations.annotations.length} | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.