@factorialco/f0-react-native 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/package.json +84 -0
- package/src/components/Activity/ActivityItem/__snapshots__/index.spec.tsx.snap +62 -0
- package/src/components/Activity/ActivityItem/index.spec.tsx +103 -0
- package/src/components/Activity/ActivityItem/index.tsx +90 -0
- package/src/components/Avatars/Avatar.tsx +56 -0
- package/src/components/Avatars/BaseAvatar/index.tsx +126 -0
- package/src/components/Avatars/BaseAvatar/utils.ts +73 -0
- package/src/components/Avatars/CompanyAvatar/__snapshots__/index.spec.tsx.snap +25 -0
- package/src/components/Avatars/CompanyAvatar/index.spec.tsx +11 -0
- package/src/components/Avatars/CompanyAvatar/index.tsx +36 -0
- package/src/components/Avatars/DateAvatar/__snapshots__/index.spec.tsx.snap +18 -0
- package/src/components/Avatars/DateAvatar/index.spec.tsx +12 -0
- package/src/components/Avatars/DateAvatar/index.tsx +22 -0
- package/src/components/Avatars/EmojiAvatar/__snapshots__/index.spec.tsx.snap +37 -0
- package/src/components/Avatars/EmojiAvatar/index.spec.tsx +15 -0
- package/src/components/Avatars/EmojiAvatar/index.tsx +37 -0
- package/src/components/Avatars/FileAvatar/__snapshots__/index.spec.tsx.snap +261 -0
- package/src/components/Avatars/FileAvatar/index.spec.tsx +43 -0
- package/src/components/Avatars/FileAvatar/index.tsx +117 -0
- package/src/components/Avatars/FileAvatar/utils.ts +103 -0
- package/src/components/Avatars/IconAvatar/__snapshots__/index.spec.tsx.snap +256 -0
- package/src/components/Avatars/IconAvatar/index.spec.tsx +16 -0
- package/src/components/Avatars/IconAvatar/index.tsx +31 -0
- package/src/components/Avatars/ModuleAvatar/index.tsx +106 -0
- package/src/components/Avatars/ModuleAvatar/modules.ts +64 -0
- package/src/components/Avatars/PersonAvatar/__snapshots__/index.spec.tsx.snap +25 -0
- package/src/components/Avatars/PersonAvatar/index.spec.tsx +13 -0
- package/src/components/Avatars/PersonAvatar/index.tsx +38 -0
- package/src/components/Avatars/TeamAvatar/__snapshots__/index.spec.tsx.snap +25 -0
- package/src/components/Avatars/TeamAvatar/index.spec.tsx +11 -0
- package/src/components/Avatars/TeamAvatar/index.tsx +36 -0
- package/src/components/Avatars/exports.ts +9 -0
- package/src/components/Avatars/types.ts +15 -0
- package/src/components/Badge/index.tsx +47 -0
- package/src/components/Button/__snapshots__/index.spec.tsx.snap +517 -0
- package/src/components/Button/index.spec.tsx +124 -0
- package/src/components/Button/index.tsx +233 -0
- package/src/components/Counter/__snapshots__/index.spec.tsx.snap +113 -0
- package/src/components/Counter/index.spec.tsx +53 -0
- package/src/components/Counter/index.tsx +59 -0
- package/src/components/ExampleComponent.tsx +22 -0
- package/src/components/Icon/README.md +63 -0
- package/src/components/Icon/__tests__/Icon.spec.tsx +35 -0
- package/src/components/Icon/index.tsx +85 -0
- package/src/components/Navigation/PageHeader/__snapshots__/index.spec.tsx.snap +242 -0
- package/src/components/Navigation/PageHeader/index.spec.tsx +198 -0
- package/src/components/Navigation/PageHeader/index.tsx +53 -0
- package/src/components/OneChip/__snapshots__/index.spec.tsx.snap +366 -0
- package/src/components/OneChip/index.spec.tsx +69 -0
- package/src/components/OneChip/index.tsx +89 -0
- package/src/components/OnePreset/__snapshots__/index.spec.tsx.snap +149 -0
- package/src/components/OnePreset/index.spec.tsx +46 -0
- package/src/components/OnePreset/index.tsx +36 -0
- package/src/components/Tags/AlertTab/__snapshots__/index.spec.tsx.snap +292 -0
- package/src/components/Tags/AlertTab/index.spec.tsx +18 -0
- package/src/components/Tags/AlertTab/index.tsx +61 -0
- package/src/components/Tags/BaseTag/index.tsx +64 -0
- package/src/components/Tags/DotTag/__snapshots__/index.spec.tsx.snap +1081 -0
- package/src/components/Tags/DotTag/index.spec.tsx +14 -0
- package/src/components/Tags/DotTag/index.tsx +54 -0
- package/src/components/Tags/RawTag/__snapshots__/index.spec.tsx.snap +213 -0
- package/src/components/Tags/RawTag/index.spec.tsx +19 -0
- package/src/components/Tags/RawTag/index.tsx +41 -0
- package/src/components/Tags/Tag.tsx +32 -0
- package/src/components/Tags/exports.ts +3 -0
- package/src/components/__tests__/ExampleComponent.spec.tsx +16 -0
- package/src/components/experimental/Lists/DataList/ItemContainer.tsx +74 -0
- package/src/components/experimental/Lists/DataList/actions/CopyAction.tsx +72 -0
- package/src/components/experimental/Lists/DataList/actions/GenericAction.tsx +37 -0
- package/src/components/experimental/Lists/DataList/index.tsx +186 -0
- package/src/components/experimental/Lists/DetailsItem/__snapshots__/index.spec.tsx.snap +759 -0
- package/src/components/experimental/Lists/DetailsItem/index.spec.tsx +81 -0
- package/src/components/experimental/Lists/DetailsItem/index.tsx +68 -0
- package/src/components/experimental/Lists/DetailsItemsList/__snapshots__/index.spec.tsx.snap +671 -0
- package/src/components/experimental/Lists/DetailsItemsList/index.spec.tsx +73 -0
- package/src/components/experimental/Lists/DetailsItemsList/index.tsx +52 -0
- package/src/icons/app/AcademicCap.tsx +31 -0
- package/src/icons/app/Add.tsx +21 -0
- package/src/icons/app/Ai.tsx +24 -0
- package/src/icons/app/Alert.tsx +16 -0
- package/src/icons/app/AlertCircle.tsx +19 -0
- package/src/icons/app/AlertCircleLine.tsx +17 -0
- package/src/icons/app/AlignTextCenter.tsx +21 -0
- package/src/icons/app/AlignTextJustify.tsx +21 -0
- package/src/icons/app/AlignTextLeft.tsx +21 -0
- package/src/icons/app/AlignTextRight.tsx +21 -0
- package/src/icons/app/Appearance.tsx +33 -0
- package/src/icons/app/Archive.tsx +21 -0
- package/src/icons/app/ArchiveOpen.tsx +21 -0
- package/src/icons/app/ArrowCycle.tsx +27 -0
- package/src/icons/app/ArrowDown.tsx +27 -0
- package/src/icons/app/ArrowLeft.tsx +21 -0
- package/src/icons/app/ArrowRight.tsx +21 -0
- package/src/icons/app/ArrowUp.tsx +21 -0
- package/src/icons/app/Bank.tsx +20 -0
- package/src/icons/app/BarGraph.tsx +21 -0
- package/src/icons/app/Bell.tsx +24 -0
- package/src/icons/app/Bold.tsx +23 -0
- package/src/icons/app/BookOpen.tsx +21 -0
- package/src/icons/app/Briefcase.tsx +18 -0
- package/src/icons/app/Bucket.tsx +23 -0
- package/src/icons/app/Building.tsx +25 -0
- package/src/icons/app/Bullet.tsx +19 -0
- package/src/icons/app/Calculator.tsx +17 -0
- package/src/icons/app/Calendar.tsx +21 -0
- package/src/icons/app/CalendarArrowDown.tsx +21 -0
- package/src/icons/app/CalendarArrowLeft.tsx +21 -0
- package/src/icons/app/CalendarArrowRight.tsx +21 -0
- package/src/icons/app/CameraPlus.tsx +22 -0
- package/src/icons/app/ChartLine.tsx +26 -0
- package/src/icons/app/ChartPie.tsx +25 -0
- package/src/icons/app/Check.tsx +21 -0
- package/src/icons/app/CheckCircle.tsx +21 -0
- package/src/icons/app/CheckCircleLine.tsx +22 -0
- package/src/icons/app/CheckDouble.tsx +21 -0
- package/src/icons/app/ChevronDown.tsx +21 -0
- package/src/icons/app/ChevronLeft.tsx +21 -0
- package/src/icons/app/ChevronRight.tsx +21 -0
- package/src/icons/app/ChevronUp.tsx +21 -0
- package/src/icons/app/Circle.tsx +16 -0
- package/src/icons/app/Clock.tsx +22 -0
- package/src/icons/app/Code.tsx +21 -0
- package/src/icons/app/Coffee.tsx +24 -0
- package/src/icons/app/Comment.tsx +19 -0
- package/src/icons/app/Completed.tsx +21 -0
- package/src/icons/app/CreditCard.tsx +21 -0
- package/src/icons/app/Cross.tsx +21 -0
- package/src/icons/app/CrossedCircle.tsx +21 -0
- package/src/icons/app/Crown.tsx +21 -0
- package/src/icons/app/Delete.tsx +21 -0
- package/src/icons/app/Deny.tsx +21 -0
- package/src/icons/app/Desktop.tsx +26 -0
- package/src/icons/app/DollarBill.tsx +22 -0
- package/src/icons/app/DottedCircle.tsx +16 -0
- package/src/icons/app/Download.tsx +21 -0
- package/src/icons/app/DropdownDefault.tsx +25 -0
- package/src/icons/app/DropdownOpen.tsx +25 -0
- package/src/icons/app/Ellipsis.tsx +36 -0
- package/src/icons/app/EllipsisHorizontal.tsx +18 -0
- package/src/icons/app/Envelope.tsx +21 -0
- package/src/icons/app/EnvelopeOpen.tsx +23 -0
- package/src/icons/app/Exit.tsx +21 -0
- package/src/icons/app/ExternalLink.tsx +21 -0
- package/src/icons/app/EyeInvisible.tsx +26 -0
- package/src/icons/app/EyeVisible.tsx +21 -0
- package/src/icons/app/FaceNegative.tsx +21 -0
- package/src/icons/app/FaceNeutral.tsx +21 -0
- package/src/icons/app/FacePositive.tsx +21 -0
- package/src/icons/app/FaceSuperNegative.tsx +21 -0
- package/src/icons/app/FaceSuperPositive.tsx +21 -0
- package/src/icons/app/Feed.tsx +21 -0
- package/src/icons/app/File.tsx +21 -0
- package/src/icons/app/FileFilled.tsx +21 -0
- package/src/icons/app/Filter.tsx +19 -0
- package/src/icons/app/Flag.tsx +21 -0
- package/src/icons/app/Folder.tsx +19 -0
- package/src/icons/app/Folders.tsx +24 -0
- package/src/icons/app/Globe.tsx +26 -0
- package/src/icons/app/Graph.tsx +26 -0
- package/src/icons/app/Handshake.tsx +29 -0
- package/src/icons/app/Heading1.tsx +21 -0
- package/src/icons/app/Heading2.tsx +21 -0
- package/src/icons/app/Heading3.tsx +21 -0
- package/src/icons/app/Heart.tsx +21 -0
- package/src/icons/app/HoldHeart.tsx +21 -0
- package/src/icons/app/Home.tsx +20 -0
- package/src/icons/app/Hub.tsx +51 -0
- package/src/icons/app/Image.tsx +21 -0
- package/src/icons/app/InProgressTask.tsx +17 -0
- package/src/icons/app/Inbox.tsx +26 -0
- package/src/icons/app/Info.tsx +21 -0
- package/src/icons/app/InfoCircle.tsx +21 -0
- package/src/icons/app/InfoCircleLine.tsx +28 -0
- package/src/icons/app/Italic.tsx +21 -0
- package/src/icons/app/Kanban.tsx +21 -0
- package/src/icons/app/Laptop.tsx +20 -0
- package/src/icons/app/LayersFront.tsx +26 -0
- package/src/icons/app/Lightbulb.tsx +26 -0
- package/src/icons/app/Link.tsx +25 -0
- package/src/icons/app/LinkRemove.tsx +20 -0
- package/src/icons/app/List.tsx +25 -0
- package/src/icons/app/LockLocked.tsx +21 -0
- package/src/icons/app/LockUnlocked.tsx +21 -0
- package/src/icons/app/LogoAvatar.tsx +23 -0
- package/src/icons/app/LogoEruditai.tsx +19 -0
- package/src/icons/app/LogoTravelperk.tsx +27 -0
- package/src/icons/app/Masonry.tsx +19 -0
- package/src/icons/app/Maximize.tsx +21 -0
- package/src/icons/app/Megaphone.tsx +21 -0
- package/src/icons/app/Menu.tsx +21 -0
- package/src/icons/app/MessageFrown.tsx +25 -0
- package/src/icons/app/MessageHeart.tsx +25 -0
- package/src/icons/app/Messages.tsx +21 -0
- package/src/icons/app/Microphone.tsx +26 -0
- package/src/icons/app/MicrophoneNegative.tsx +26 -0
- package/src/icons/app/Minimize.tsx +21 -0
- package/src/icons/app/Minus.tsx +21 -0
- package/src/icons/app/Mobile.tsx +21 -0
- package/src/icons/app/Money.tsx +26 -0
- package/src/icons/app/MoneyBag.tsx +24 -0
- package/src/icons/app/MoveDown.tsx +44 -0
- package/src/icons/app/MoveTop.tsx +34 -0
- package/src/icons/app/MoveUp.tsx +42 -0
- package/src/icons/app/Office.tsx +31 -0
- package/src/icons/app/OlList.tsx +21 -0
- package/src/icons/app/PalmTree.tsx +20 -0
- package/src/icons/app/Paperclip.tsx +20 -0
- package/src/icons/app/PartiallyCompleted.tsx +21 -0
- package/src/icons/app/PauseCircle.tsx +21 -0
- package/src/icons/app/Pencil.tsx +21 -0
- package/src/icons/app/People.tsx +27 -0
- package/src/icons/app/Person.tsx +22 -0
- package/src/icons/app/Phone.tsx +20 -0
- package/src/icons/app/Pin.tsx +22 -0
- package/src/icons/app/PixBrazil.tsx +19 -0
- package/src/icons/app/Placeholder.tsx +21 -0
- package/src/icons/app/Plane.tsx +21 -0
- package/src/icons/app/Plus.tsx +21 -0
- package/src/icons/app/Present.tsx +31 -0
- package/src/icons/app/Printer.tsx +26 -0
- package/src/icons/app/Proyector.tsx +22 -0
- package/src/icons/app/Question.tsx +22 -0
- package/src/icons/app/Quote.tsx +21 -0
- package/src/icons/app/Reaction.tsx +32 -0
- package/src/icons/app/Receipt.tsx +20 -0
- package/src/icons/app/Record.tsx +17 -0
- package/src/icons/app/RemoveFavorite.tsx +21 -0
- package/src/icons/app/Replace.tsx +21 -0
- package/src/icons/app/Reset.tsx +27 -0
- package/src/icons/app/Rocket.tsx +26 -0
- package/src/icons/app/Salad.tsx +21 -0
- package/src/icons/app/Save.tsx +27 -0
- package/src/icons/app/Schedule.tsx +32 -0
- package/src/icons/app/Search.tsx +17 -0
- package/src/icons/app/SearchPerson.tsx +24 -0
- package/src/icons/app/Settings.tsx +20 -0
- package/src/icons/app/Share.tsx +27 -0
- package/src/icons/app/Sliders.tsx +22 -0
- package/src/icons/app/SolidPause.tsx +19 -0
- package/src/icons/app/SolidPlay.tsx +19 -0
- package/src/icons/app/SolidStop.tsx +19 -0
- package/src/icons/app/Sort.tsx +21 -0
- package/src/icons/app/Sparkles.tsx +25 -0
- package/src/icons/app/Spinner.tsx +20 -0
- package/src/icons/app/Split.tsx +21 -0
- package/src/icons/app/Star.tsx +21 -0
- package/src/icons/app/StarFilled.tsx +19 -0
- package/src/icons/app/Strikethrough.tsx +21 -0
- package/src/icons/app/Suitcase.tsx +22 -0
- package/src/icons/app/Table.tsx +21 -0
- package/src/icons/app/Target.tsx +31 -0
- package/src/icons/app/TextSize.tsx +21 -0
- package/src/icons/app/Timer.tsx +27 -0
- package/src/icons/app/Underline.tsx +26 -0
- package/src/icons/app/Upload.tsx +21 -0
- package/src/icons/app/Video.tsx +23 -0
- package/src/icons/app/VideoRecorder.tsx +31 -0
- package/src/icons/app/VideoRecorderNegative.tsx +22 -0
- package/src/icons/app/Wallet.tsx +26 -0
- package/src/icons/app/Warning.tsx +21 -0
- package/src/icons/app/WhatsappChat.tsx +23 -0
- package/src/icons/app/Windows.tsx +21 -0
- package/src/icons/app/index.ts +186 -0
- package/src/icons/index.ts +5 -0
- package/src/icons/modules/Benefits.tsx +25 -0
- package/src/icons/modules/Calendar.tsx +21 -0
- package/src/icons/modules/Cards.tsx +25 -0
- package/src/icons/modules/ClockIn.tsx +21 -0
- package/src/icons/modules/Discover.tsx +25 -0
- package/src/icons/modules/Documents.tsx +19 -0
- package/src/icons/modules/Engagement.tsx +21 -0
- package/src/icons/modules/Finance.tsx +21 -0
- package/src/icons/modules/Goals.tsx +19 -0
- package/src/icons/modules/Home.tsx +19 -0
- package/src/icons/modules/Hub.tsx +20 -0
- package/src/icons/modules/Inbox.tsx +19 -0
- package/src/icons/modules/Kudos.tsx +19 -0
- package/src/icons/modules/MyDocuments.tsx +21 -0
- package/src/icons/modules/Organization.tsx +19 -0
- package/src/icons/modules/Overviews.tsx +23 -0
- package/src/icons/modules/Payroll.tsx +25 -0
- package/src/icons/modules/Performance.tsx +19 -0
- package/src/icons/modules/Profile.tsx +19 -0
- package/src/icons/modules/Projects.tsx +21 -0
- package/src/icons/modules/Recruitment.tsx +21 -0
- package/src/icons/modules/Reports.tsx +21 -0
- package/src/icons/modules/Sales.tsx +27 -0
- package/src/icons/modules/Settings.tsx +21 -0
- package/src/icons/modules/Shifts.tsx +27 -0
- package/src/icons/modules/Social.tsx +21 -0
- package/src/icons/modules/Software.tsx +19 -0
- package/src/icons/modules/Spaces.tsx +21 -0
- package/src/icons/modules/Spending.tsx +21 -0
- package/src/icons/modules/Tasks.tsx +21 -0
- package/src/icons/modules/TimeOff.tsx +21 -0
- package/src/icons/modules/TimeTracking.tsx +25 -0
- package/src/icons/modules/Trainings.tsx +19 -0
- package/src/icons/modules/Treasury.tsx +19 -0
- package/src/icons/modules/Workflows.tsx +19 -0
- package/src/icons/modules/index.ts +35 -0
- package/src/icons/types.ts +9 -0
- package/src/index.ts +18 -0
- package/src/lib/date.ts +102 -0
- package/src/lib/emojis.tsx +47 -0
- package/src/lib/iconWithClassName.ts +17 -0
- package/src/lib/text.ts +31 -0
- package/src/lib/utils.ts +6 -0
- package/src/ui/avatar.tsx +113 -0
- package/tailwind.config.ts +19 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { BaseAvatar } from "../BaseAvatar";
|
|
3
|
+
import { AvatarBadge } from "../types";
|
|
4
|
+
|
|
5
|
+
type BaseAvatarProps = ComponentProps<typeof BaseAvatar>;
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
name: string;
|
|
9
|
+
src?: string;
|
|
10
|
+
size?: BaseAvatarProps["size"];
|
|
11
|
+
badge?: AvatarBadge;
|
|
12
|
+
} & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
|
|
13
|
+
|
|
14
|
+
export const CompanyAvatar = ({
|
|
15
|
+
name,
|
|
16
|
+
src,
|
|
17
|
+
size,
|
|
18
|
+
"aria-label": ariaLabel,
|
|
19
|
+
"aria-labelledby": ariaLabelledby,
|
|
20
|
+
badge,
|
|
21
|
+
}: Props) => {
|
|
22
|
+
return (
|
|
23
|
+
<BaseAvatar
|
|
24
|
+
type="base"
|
|
25
|
+
name={name}
|
|
26
|
+
src={src}
|
|
27
|
+
size={size}
|
|
28
|
+
color="viridian"
|
|
29
|
+
aria-label={ariaLabel}
|
|
30
|
+
aria-labelledby={ariaLabelledby}
|
|
31
|
+
badge={badge}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
CompanyAvatar.displayName = "CompanyAvatar";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`DateAvatar Snapshot 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
className="flex h-10 w-10 flex-col items-center justify-center rounded border border-solid border-f1-border-secondary bg-f1-background-inverse-secondary"
|
|
6
|
+
>
|
|
7
|
+
<Text
|
|
8
|
+
className="pt-0.5 text-xs font-semibold uppercase leading-3 text-f1-special-highlight dark:text-f1-foreground-inverse-secondary"
|
|
9
|
+
>
|
|
10
|
+
Jan
|
|
11
|
+
</Text>
|
|
12
|
+
<Text
|
|
13
|
+
className="flex items-center justify-center text-lg font-medium leading-tight text-f1-foreground"
|
|
14
|
+
>
|
|
15
|
+
1
|
|
16
|
+
</Text>
|
|
17
|
+
</View>
|
|
18
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { render } from "@testing-library/react-native";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { DateAvatar } from "./";
|
|
4
|
+
|
|
5
|
+
describe("DateAvatar", () => {
|
|
6
|
+
it("Snapshot", () => {
|
|
7
|
+
const fixedDate = new Date("2025-01-01T00:00:00Z");
|
|
8
|
+
const { toJSON } = render(<DateAvatar date={fixedDate} />);
|
|
9
|
+
|
|
10
|
+
expect(toJSON()).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { View, Text } from "react-native";
|
|
2
|
+
import { getAbbreviateMonth, getDayOfMonth } from "../../../lib/date";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
date: Date;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const DateAvatar = ({ date }: Props) => {
|
|
9
|
+
const dateDay = getDayOfMonth(date);
|
|
10
|
+
const month = getAbbreviateMonth(date);
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<View className="flex h-10 w-10 flex-col items-center justify-center rounded border border-solid border-f1-border-secondary bg-f1-background-inverse-secondary">
|
|
14
|
+
<Text className="pt-0.5 text-xs font-semibold uppercase leading-3 text-f1-special-highlight dark:text-f1-foreground-inverse-secondary">
|
|
15
|
+
{month}
|
|
16
|
+
</Text>
|
|
17
|
+
<Text className="flex items-center justify-center text-lg font-medium leading-tight text-f1-foreground">
|
|
18
|
+
{dateDay}
|
|
19
|
+
</Text>
|
|
20
|
+
</View>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`EmojiAvatar Snapshot - different sizes text emoji and diferent size 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
className="w-6 h-6 rounded-sm flex aspect-square items-center justify-center border border-solid border-f1-border-secondary bg-f1-background dark:bg-f1-background-inverse-secondary"
|
|
6
|
+
>
|
|
7
|
+
<Text
|
|
8
|
+
className="text-xs"
|
|
9
|
+
>
|
|
10
|
+
test
|
|
11
|
+
</Text>
|
|
12
|
+
</View>
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports[`EmojiAvatar Snapshot - different sizes text emoji and diferent size 2`] = `
|
|
16
|
+
<View
|
|
17
|
+
className="w-9 h-9 rounded-md flex aspect-square items-center justify-center border border-solid border-f1-border-secondary bg-f1-background dark:bg-f1-background-inverse-secondary"
|
|
18
|
+
>
|
|
19
|
+
<Text
|
|
20
|
+
className="text-sm"
|
|
21
|
+
>
|
|
22
|
+
test
|
|
23
|
+
</Text>
|
|
24
|
+
</View>
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
exports[`EmojiAvatar Snapshot - different sizes text emoji and diferent size 3`] = `
|
|
28
|
+
<View
|
|
29
|
+
className="w-10 h-10 rounded-lg flex aspect-square items-center justify-center border border-solid border-f1-border-secondary bg-f1-background dark:bg-f1-background-inverse-secondary"
|
|
30
|
+
>
|
|
31
|
+
<Text
|
|
32
|
+
className="text-md"
|
|
33
|
+
>
|
|
34
|
+
test
|
|
35
|
+
</Text>
|
|
36
|
+
</View>
|
|
37
|
+
`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { render } from "@testing-library/react-native";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { EmojiAvatar } from "./";
|
|
4
|
+
|
|
5
|
+
describe("EmojiAvatar", () => {
|
|
6
|
+
it("Snapshot - different sizes text emoji and diferent size", () => {
|
|
7
|
+
const sizes = ["sm", "md", "lg"] as const;
|
|
8
|
+
|
|
9
|
+
sizes.forEach((size) => {
|
|
10
|
+
const { toJSON } = render(<EmojiAvatar emoji="test" size={size} />);
|
|
11
|
+
|
|
12
|
+
expect(toJSON()).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { View } from "react-native";
|
|
2
|
+
import { EmojiImage } from "../../../lib/emojis";
|
|
3
|
+
import { cn } from "../../../lib/utils";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
emoji: string;
|
|
7
|
+
size?: "sm" | "md" | "lg";
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const sizes = {
|
|
12
|
+
sm: "w-6 h-6 rounded-sm",
|
|
13
|
+
md: "w-9 h-9 rounded-md",
|
|
14
|
+
lg: "w-10 h-10 rounded-lg",
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const emojiSize = {
|
|
18
|
+
sm: { icon: "w-4 h-4", text: "text-xs" },
|
|
19
|
+
md: { icon: "w-5 h-5", text: "text-sm" },
|
|
20
|
+
lg: { icon: "w-6 h-6", text: "text-md" },
|
|
21
|
+
} as const;
|
|
22
|
+
|
|
23
|
+
export const EmojiAvatar = ({ emoji, size = "md", className }: Props) => {
|
|
24
|
+
return (
|
|
25
|
+
<View
|
|
26
|
+
className={cn(
|
|
27
|
+
className,
|
|
28
|
+
sizes[size],
|
|
29
|
+
"flex aspect-square items-center justify-center border border-solid border-f1-border-secondary bg-f1-background dark:bg-f1-background-inverse-secondary",
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
32
|
+
<EmojiImage emoji={emoji} size={emojiSize[size]} />
|
|
33
|
+
</View>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
EmojiAvatar.displayName = "EmojiAvatar";
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`FileAvatar Snapshot - different file types 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
className="inline-flex "
|
|
6
|
+
>
|
|
7
|
+
<View
|
|
8
|
+
className="h-fit w-fit"
|
|
9
|
+
>
|
|
10
|
+
<View
|
|
11
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
12
|
+
>
|
|
13
|
+
<Text
|
|
14
|
+
className="font-semibold text-sm text-f1-foreground-accent"
|
|
15
|
+
>
|
|
16
|
+
PDF
|
|
17
|
+
</Text>
|
|
18
|
+
</View>
|
|
19
|
+
</View>
|
|
20
|
+
</View>
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
exports[`FileAvatar Snapshot - different file types 2`] = `
|
|
24
|
+
<View
|
|
25
|
+
className="inline-flex "
|
|
26
|
+
>
|
|
27
|
+
<View
|
|
28
|
+
className="h-fit w-fit"
|
|
29
|
+
>
|
|
30
|
+
<View
|
|
31
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
32
|
+
>
|
|
33
|
+
<Text
|
|
34
|
+
className="font-semibold text-sm text-f1-foreground-info"
|
|
35
|
+
>
|
|
36
|
+
IMG
|
|
37
|
+
</Text>
|
|
38
|
+
</View>
|
|
39
|
+
</View>
|
|
40
|
+
</View>
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
exports[`FileAvatar Snapshot - different file types 3`] = `
|
|
44
|
+
<View
|
|
45
|
+
className="inline-flex "
|
|
46
|
+
>
|
|
47
|
+
<View
|
|
48
|
+
className="h-fit w-fit"
|
|
49
|
+
>
|
|
50
|
+
<View
|
|
51
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
52
|
+
>
|
|
53
|
+
<Text
|
|
54
|
+
className="font-semibold text-sm text-f1-foreground-info"
|
|
55
|
+
>
|
|
56
|
+
DOC
|
|
57
|
+
</Text>
|
|
58
|
+
</View>
|
|
59
|
+
</View>
|
|
60
|
+
</View>
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
exports[`FileAvatar Snapshot - different file types 4`] = `
|
|
64
|
+
<View
|
|
65
|
+
className="inline-flex "
|
|
66
|
+
>
|
|
67
|
+
<View
|
|
68
|
+
className="h-fit w-fit"
|
|
69
|
+
>
|
|
70
|
+
<View
|
|
71
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
72
|
+
>
|
|
73
|
+
<Text
|
|
74
|
+
className="font-semibold text-sm text-f1-foreground-positive"
|
|
75
|
+
>
|
|
76
|
+
XLS
|
|
77
|
+
</Text>
|
|
78
|
+
</View>
|
|
79
|
+
</View>
|
|
80
|
+
</View>
|
|
81
|
+
`;
|
|
82
|
+
|
|
83
|
+
exports[`FileAvatar Snapshot - different file types 5`] = `
|
|
84
|
+
<View
|
|
85
|
+
className="inline-flex "
|
|
86
|
+
>
|
|
87
|
+
<View
|
|
88
|
+
className="h-fit w-fit"
|
|
89
|
+
>
|
|
90
|
+
<View
|
|
91
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
92
|
+
>
|
|
93
|
+
<Text
|
|
94
|
+
className="font-semibold text-sm text-f1-foreground-warning"
|
|
95
|
+
>
|
|
96
|
+
PPT
|
|
97
|
+
</Text>
|
|
98
|
+
</View>
|
|
99
|
+
</View>
|
|
100
|
+
</View>
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
exports[`FileAvatar Snapshot - different file types 6`] = `
|
|
104
|
+
<View
|
|
105
|
+
className="inline-flex "
|
|
106
|
+
>
|
|
107
|
+
<View
|
|
108
|
+
className="h-fit w-fit"
|
|
109
|
+
>
|
|
110
|
+
<View
|
|
111
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
112
|
+
>
|
|
113
|
+
<Text
|
|
114
|
+
className="font-semibold text-sm text-f1-foreground-secondary"
|
|
115
|
+
>
|
|
116
|
+
TXT
|
|
117
|
+
</Text>
|
|
118
|
+
</View>
|
|
119
|
+
</View>
|
|
120
|
+
</View>
|
|
121
|
+
`;
|
|
122
|
+
|
|
123
|
+
exports[`FileAvatar Snapshot - different file types 7`] = `
|
|
124
|
+
<View
|
|
125
|
+
className="inline-flex "
|
|
126
|
+
>
|
|
127
|
+
<View
|
|
128
|
+
className="h-fit w-fit"
|
|
129
|
+
>
|
|
130
|
+
<View
|
|
131
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
132
|
+
>
|
|
133
|
+
<Text
|
|
134
|
+
className="font-semibold text-sm text-f1-foreground-info"
|
|
135
|
+
>
|
|
136
|
+
VID
|
|
137
|
+
</Text>
|
|
138
|
+
</View>
|
|
139
|
+
</View>
|
|
140
|
+
</View>
|
|
141
|
+
`;
|
|
142
|
+
|
|
143
|
+
exports[`FileAvatar Snapshot - different file types 8`] = `
|
|
144
|
+
<View
|
|
145
|
+
className="inline-flex "
|
|
146
|
+
>
|
|
147
|
+
<View
|
|
148
|
+
className="h-fit w-fit"
|
|
149
|
+
>
|
|
150
|
+
<View
|
|
151
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
152
|
+
>
|
|
153
|
+
<Text
|
|
154
|
+
className="font-semibold text-sm text-f1-foreground-accent"
|
|
155
|
+
>
|
|
156
|
+
AUD
|
|
157
|
+
</Text>
|
|
158
|
+
</View>
|
|
159
|
+
</View>
|
|
160
|
+
</View>
|
|
161
|
+
`;
|
|
162
|
+
|
|
163
|
+
exports[`FileAvatar Snapshot - different file types 9`] = `
|
|
164
|
+
<View
|
|
165
|
+
className="inline-flex "
|
|
166
|
+
>
|
|
167
|
+
<View
|
|
168
|
+
className="h-fit w-fit"
|
|
169
|
+
>
|
|
170
|
+
<View
|
|
171
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
172
|
+
>
|
|
173
|
+
<Text
|
|
174
|
+
className="font-semibold text-sm text-f1-foreground-warning"
|
|
175
|
+
>
|
|
176
|
+
ZIP
|
|
177
|
+
</Text>
|
|
178
|
+
</View>
|
|
179
|
+
</View>
|
|
180
|
+
</View>
|
|
181
|
+
`;
|
|
182
|
+
|
|
183
|
+
exports[`FileAvatar Snapshot - different file types 10`] = `
|
|
184
|
+
<View
|
|
185
|
+
className="inline-flex "
|
|
186
|
+
>
|
|
187
|
+
<View
|
|
188
|
+
className="h-fit w-fit"
|
|
189
|
+
>
|
|
190
|
+
<View
|
|
191
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
192
|
+
>
|
|
193
|
+
<Text
|
|
194
|
+
className="font-semibold text-sm text-f1-foreground-positive"
|
|
195
|
+
>
|
|
196
|
+
CSV
|
|
197
|
+
</Text>
|
|
198
|
+
</View>
|
|
199
|
+
</View>
|
|
200
|
+
</View>
|
|
201
|
+
`;
|
|
202
|
+
|
|
203
|
+
exports[`FileAvatar Snapshot - different file types 11`] = `
|
|
204
|
+
<View
|
|
205
|
+
className="inline-flex "
|
|
206
|
+
>
|
|
207
|
+
<View
|
|
208
|
+
className="h-fit w-fit"
|
|
209
|
+
>
|
|
210
|
+
<View
|
|
211
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
212
|
+
>
|
|
213
|
+
<Text
|
|
214
|
+
className="font-semibold text-sm text-f1-foreground-accent"
|
|
215
|
+
>
|
|
216
|
+
HTM
|
|
217
|
+
</Text>
|
|
218
|
+
</View>
|
|
219
|
+
</View>
|
|
220
|
+
</View>
|
|
221
|
+
`;
|
|
222
|
+
|
|
223
|
+
exports[`FileAvatar Snapshot - different file types 12`] = `
|
|
224
|
+
<View
|
|
225
|
+
className="inline-flex "
|
|
226
|
+
>
|
|
227
|
+
<View
|
|
228
|
+
className="h-fit w-fit"
|
|
229
|
+
>
|
|
230
|
+
<View
|
|
231
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
232
|
+
>
|
|
233
|
+
<Text
|
|
234
|
+
className="font-semibold text-sm text-f1-foreground-secondary"
|
|
235
|
+
>
|
|
236
|
+
MD
|
|
237
|
+
</Text>
|
|
238
|
+
</View>
|
|
239
|
+
</View>
|
|
240
|
+
</View>
|
|
241
|
+
`;
|
|
242
|
+
|
|
243
|
+
exports[`FileAvatar Snapshot - different file types 13`] = `
|
|
244
|
+
<View
|
|
245
|
+
className="inline-flex "
|
|
246
|
+
>
|
|
247
|
+
<View
|
|
248
|
+
className="h-fit w-fit"
|
|
249
|
+
>
|
|
250
|
+
<View
|
|
251
|
+
className="flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold w-8 h-8 rounded border border-solid border-f1-border-secondary bg-f1-background"
|
|
252
|
+
>
|
|
253
|
+
<Text
|
|
254
|
+
className="font-semibold text-sm text-f1-foreground"
|
|
255
|
+
>
|
|
256
|
+
FIL
|
|
257
|
+
</Text>
|
|
258
|
+
</View>
|
|
259
|
+
</View>
|
|
260
|
+
</View>
|
|
261
|
+
`;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { render } from "@testing-library/react-native";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FileAvatar } from "./";
|
|
4
|
+
|
|
5
|
+
describe("FileAvatar", () => {
|
|
6
|
+
it("Snapshot - different file types", () => {
|
|
7
|
+
const fileTypes = [
|
|
8
|
+
{ name: "document.pdf", type: "application/pdf" },
|
|
9
|
+
{ name: "image.jpg", type: "image/jpeg" },
|
|
10
|
+
{
|
|
11
|
+
name: "document.docx",
|
|
12
|
+
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: "spreadsheet.xlsx",
|
|
16
|
+
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "presentation.pptx",
|
|
20
|
+
type: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
21
|
+
},
|
|
22
|
+
{ name: "text.txt", type: "text/plain" },
|
|
23
|
+
{ name: "video.mp4", type: "video/mp4" },
|
|
24
|
+
{ name: "audio.mp3", type: "audio/mpeg" },
|
|
25
|
+
{ name: "archive.zip", type: "application/zip" },
|
|
26
|
+
{ name: "data.csv", type: "csv" },
|
|
27
|
+
{ name: "webpage.html", type: "html" },
|
|
28
|
+
{ name: "readme.md", type: "markdown" },
|
|
29
|
+
{ name: "unknown.xyz", type: "undefined" },
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
fileTypes.map((fileType, index) => {
|
|
33
|
+
const { toJSON } = render(
|
|
34
|
+
<FileAvatar
|
|
35
|
+
key={index}
|
|
36
|
+
file={new File([""], fileType.name, { type: fileType.type })}
|
|
37
|
+
/>,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
expect(toJSON()).toMatchSnapshot();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { ComponentProps, useMemo } from "react";
|
|
2
|
+
import { Text } from "react-native";
|
|
3
|
+
import { FileLike, getFileTypeInfo } from "./utils";
|
|
4
|
+
import { Avatar } from "../../../ui/avatar";
|
|
5
|
+
import { cn } from "../../../lib/utils";
|
|
6
|
+
import { BaseAvatar } from "../BaseAvatar";
|
|
7
|
+
import { AvatarBadge } from "../types";
|
|
8
|
+
import { ModuleAvatar, ModuleAvatarProps } from "../ModuleAvatar";
|
|
9
|
+
import { Badge, BadgeProps } from "../../Badge";
|
|
10
|
+
import { View } from "react-native";
|
|
11
|
+
import { getInitials } from "../BaseAvatar/utils";
|
|
12
|
+
|
|
13
|
+
type BaseAvatarProps = ComponentProps<typeof BaseAvatar>;
|
|
14
|
+
|
|
15
|
+
type Props = {
|
|
16
|
+
file: FileLike;
|
|
17
|
+
className?: string;
|
|
18
|
+
size?: BaseAvatarProps["size"];
|
|
19
|
+
badge?: AvatarBadge;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const textSizes = {
|
|
23
|
+
xsmall: "text-xs",
|
|
24
|
+
small: "text-xs",
|
|
25
|
+
medium: "text-sm",
|
|
26
|
+
large: "text-md",
|
|
27
|
+
xlarge: "text-2xl",
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const getAvatarSize = (
|
|
31
|
+
size: BaseAvatarProps["size"],
|
|
32
|
+
): ModuleAvatarProps["size"] | undefined => {
|
|
33
|
+
const sizeMap: Partial<
|
|
34
|
+
Record<
|
|
35
|
+
Exclude<BaseAvatarProps["size"], undefined>,
|
|
36
|
+
ModuleAvatarProps["size"]
|
|
37
|
+
>
|
|
38
|
+
> = {
|
|
39
|
+
xlarge: "lg",
|
|
40
|
+
large: "md",
|
|
41
|
+
small: "sm",
|
|
42
|
+
} as const;
|
|
43
|
+
|
|
44
|
+
return size && sizeMap[size] ? sizeMap[size] : sizeMap.small;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const getBadgeSize = (
|
|
48
|
+
size: BaseAvatarProps["size"],
|
|
49
|
+
): BadgeProps["size"] | undefined => {
|
|
50
|
+
const sizeMap: Partial<
|
|
51
|
+
Record<Exclude<BaseAvatarProps["size"], undefined>, BadgeProps["size"]>
|
|
52
|
+
> = {
|
|
53
|
+
xlarge: "lg",
|
|
54
|
+
large: "md",
|
|
55
|
+
small: "sm",
|
|
56
|
+
} as const;
|
|
57
|
+
|
|
58
|
+
return size && sizeMap[size] ? sizeMap[size] : sizeMap.small;
|
|
59
|
+
};
|
|
60
|
+
export const FileAvatar = ({
|
|
61
|
+
file,
|
|
62
|
+
className,
|
|
63
|
+
size = "medium",
|
|
64
|
+
badge,
|
|
65
|
+
...props
|
|
66
|
+
}: Props) => {
|
|
67
|
+
const { type: fileType, color: fileColor } = getFileTypeInfo(file);
|
|
68
|
+
const initials = getInitials(fileType, size, true);
|
|
69
|
+
const badgeSize = getBadgeSize(size);
|
|
70
|
+
const moduleAvatarSize = getAvatarSize(size);
|
|
71
|
+
const badgeContent = useMemo(
|
|
72
|
+
() =>
|
|
73
|
+
badge ? (
|
|
74
|
+
<>
|
|
75
|
+
{badge.type === "module" && (
|
|
76
|
+
<ModuleAvatar module={badge.module} size={moduleAvatarSize} />
|
|
77
|
+
)}
|
|
78
|
+
{badge.type !== "module" && (
|
|
79
|
+
<Badge type={badge.type} icon={badge.icon} size={badgeSize} />
|
|
80
|
+
)}
|
|
81
|
+
</>
|
|
82
|
+
) : null,
|
|
83
|
+
[badge, badgeSize, moduleAvatarSize],
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<View
|
|
88
|
+
className={`inline-flex ${badge && badge.type === "module" ? "p-[3px]" : ""}`}
|
|
89
|
+
>
|
|
90
|
+
<View className="h-fit w-fit">
|
|
91
|
+
<Avatar
|
|
92
|
+
size={size}
|
|
93
|
+
className={cn(
|
|
94
|
+
"border border-solid border-f1-border-secondary bg-f1-background",
|
|
95
|
+
className,
|
|
96
|
+
)}
|
|
97
|
+
{...props}
|
|
98
|
+
>
|
|
99
|
+
<Text
|
|
100
|
+
className={cn(
|
|
101
|
+
"font-semibold text-f1-foreground-inverse/90",
|
|
102
|
+
textSizes[size],
|
|
103
|
+
fileColor,
|
|
104
|
+
)}
|
|
105
|
+
>
|
|
106
|
+
{initials}
|
|
107
|
+
</Text>
|
|
108
|
+
</Avatar>
|
|
109
|
+
</View>
|
|
110
|
+
{badge && (
|
|
111
|
+
<View className="absolute -bottom-0.5 -right-0.5">{badgeContent}</View>
|
|
112
|
+
)}
|
|
113
|
+
</View>
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
FileAvatar.displayName = "FileAvatar";
|