@learncard/react 2.10.3 → 2.10.4
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 +10 -10
- package/dist/base.css +1 -1
- package/dist/base.js +1 -1
- package/dist/cjs/{BoostGenericCard-0f68947f.js → BoostGenericCard-5a07339f.js} +2 -2
- package/dist/cjs/{BoostGenericCard-0f68947f.js.map → BoostGenericCard-5a07339f.js.map} +1 -1
- package/dist/cjs/{CertificateDisplayCard-6c30f6e6.js → CertificateDisplayCard-a7940558.js} +4 -4
- package/dist/cjs/{CertificateDisplayCard-6c30f6e6.js.map → CertificateDisplayCard-a7940558.js.map} +1 -1
- package/dist/cjs/CircleIcon-f0fa68c7.js.map +1 -1
- package/dist/cjs/{LearnCardCreditCardFrontFace-aca1b7bc.js → LearnCardCreditCardFrontFace-75fb4e44.js} +2 -2
- package/dist/cjs/{LearnCardCreditCardFrontFace-aca1b7bc.js.map → LearnCardCreditCardFrontFace-75fb4e44.js.map} +1 -1
- package/dist/cjs/{MeritBadgeDisplayCard-535853f5.js → MeritBadgeDisplayCard-1c614da9.js} +4 -4
- package/dist/cjs/{MeritBadgeDisplayCard-535853f5.js.map → MeritBadgeDisplayCard-1c614da9.js.map} +1 -1
- package/dist/cjs/{MeritBadgeSkillsCount-5cc7d16e.js → MeritBadgeSkillsCount-4dabf982.js} +2 -2
- package/dist/cjs/{MeritBadgeSkillsCount-5cc7d16e.js.map → MeritBadgeSkillsCount-4dabf982.js.map} +1 -1
- package/dist/cjs/{QRCodeCard-f0079bd9.js → QRCodeCard-2378411e.js} +2 -2
- package/dist/cjs/{QRCodeCard-f0079bd9.js.map → QRCodeCard-2378411e.js.map} +1 -1
- package/dist/cjs/{SchoolIDCard-e22d0d80.js → SchoolIDCard-2d3cbb2c.js} +13 -1189
- package/dist/cjs/SchoolIDCard-2d3cbb2c.js.map +1 -0
- package/dist/cjs/{VCCard-deabc204.js → VCCard-5bb95d29.js} +3 -3
- package/dist/cjs/{VCCard-deabc204.js.map → VCCard-5bb95d29.js.map} +1 -1
- package/dist/cjs/{VCDisplayBackFace-a15d5252.js → VCDisplayBackFace-864c35d5.js} +3 -3
- package/dist/cjs/{VCDisplayBackFace-a15d5252.js.map → VCDisplayBackFace-864c35d5.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard-a64fa405.js → VCDisplayCard-15af27c6.js} +3 -3
- package/dist/cjs/{VCDisplayCard-a64fa405.js.map → VCDisplayCard-15af27c6.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-6c87eade.js → VCDisplayCard2-f3f5c6c4.js} +28 -22
- package/dist/cjs/VCDisplayCard2-f3f5c6c4.js.map +1 -0
- package/dist/cjs/{VCVerificationPill-e1cc6be2.js → VCVerificationPill-20ed4d3c.js} +2 -2
- package/dist/cjs/{VCVerificationPill-e1cc6be2.js.map → VCVerificationPill-20ed4d3c.js.map} +1 -1
- package/dist/cjs/{VerifierStateBadgeAndText-5229da1a.js → VerifierStateBadgeAndText-de5bd85f.js} +9 -11
- package/dist/cjs/VerifierStateBadgeAndText-de5bd85f.js.map +1 -0
- package/dist/cjs/{credential.helpers-473e89c5.js → credential.helpers-b4d27c8a.js} +3 -3
- package/dist/cjs/credential.helpers-b4d27c8a.js.map +1 -0
- package/dist/cjs/{index-ec1d26f1.js → index-330dcb9c.js} +1 -1
- package/dist/cjs/index-330dcb9c.js.map +1 -0
- package/dist/cjs/index-47efbf5b.js +1186 -0
- package/dist/cjs/index-47efbf5b.js.map +1 -0
- package/dist/cjs/{index-0cac2c5b.js → index-da255c9a.js} +1 -1
- package/dist/cjs/index-da255c9a.js.map +1 -0
- package/dist/cjs/index.js +18 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index14.js +18 -17
- package/dist/cjs/index14.js.map +1 -1
- package/dist/cjs/index18.js +2 -2
- package/dist/cjs/index22.js +6 -6
- package/dist/cjs/index28.js +2 -2
- package/dist/cjs/index31.js +2 -1
- package/dist/cjs/index31.js.map +1 -1
- package/dist/cjs/index39.js +12 -11
- package/dist/cjs/index39.js.map +1 -1
- package/dist/cjs/index4.js +4 -4
- package/dist/cjs/index40.js +5 -5
- package/dist/cjs/index41.js +6 -6
- package/dist/cjs/index42.js +8 -7
- package/dist/cjs/index42.js.map +1 -1
- package/dist/cjs/index43.js +2 -2
- package/dist/cjs/index46.js +2 -2
- package/dist/cjs/index7.js +5 -5
- package/dist/cjs/{types.esm-12bb5eed.js → types.esm-40b77196.js} +3 -2
- package/dist/cjs/types.esm-40b77196.js.map +1 -0
- package/dist/esm/{BoostGenericCard-b332a829.js → BoostGenericCard-997af0f5.js} +2 -2
- package/dist/esm/{BoostGenericCard-b332a829.js.map → BoostGenericCard-997af0f5.js.map} +1 -1
- package/dist/esm/{CertificateDisplayCard-fc148ca0.js → CertificateDisplayCard-d764151e.js} +4 -4
- package/dist/esm/{CertificateDisplayCard-fc148ca0.js.map → CertificateDisplayCard-d764151e.js.map} +1 -1
- package/dist/esm/CircleIcon-abd5ff06.js.map +1 -1
- package/dist/esm/{LearnCardCreditCardFrontFace-b7c917f5.js → LearnCardCreditCardFrontFace-13d29504.js} +2 -2
- package/dist/esm/{LearnCardCreditCardFrontFace-b7c917f5.js.map → LearnCardCreditCardFrontFace-13d29504.js.map} +1 -1
- package/dist/esm/{MeritBadgeDisplayCard-da9de0b8.js → MeritBadgeDisplayCard-907627ed.js} +4 -4
- package/dist/esm/{MeritBadgeDisplayCard-da9de0b8.js.map → MeritBadgeDisplayCard-907627ed.js.map} +1 -1
- package/dist/esm/{MeritBadgeSkillsCount-01e2756e.js → MeritBadgeSkillsCount-9474bd51.js} +2 -2
- package/dist/esm/{MeritBadgeSkillsCount-01e2756e.js.map → MeritBadgeSkillsCount-9474bd51.js.map} +1 -1
- package/dist/esm/{QRCodeCard-8f29c3c7.js → QRCodeCard-3abf9f33.js} +2 -2
- package/dist/esm/{QRCodeCard-8f29c3c7.js.map → QRCodeCard-3abf9f33.js.map} +1 -1
- package/dist/esm/{SchoolIDCard-8b151cd3.js → SchoolIDCard-fbd1cf6c.js} +12 -1188
- package/dist/esm/SchoolIDCard-fbd1cf6c.js.map +1 -0
- package/dist/esm/{VCCard-94dbe6bf.js → VCCard-ce4b451d.js} +3 -3
- package/dist/esm/{VCCard-94dbe6bf.js.map → VCCard-ce4b451d.js.map} +1 -1
- package/dist/esm/{VCDisplayBackFace-9c5b383f.js → VCDisplayBackFace-e347145c.js} +3 -3
- package/dist/esm/{VCDisplayBackFace-9c5b383f.js.map → VCDisplayBackFace-e347145c.js.map} +1 -1
- package/dist/esm/{VCDisplayCard-bd4d15e1.js → VCDisplayCard-3002776b.js} +3 -3
- package/dist/esm/{VCDisplayCard-bd4d15e1.js.map → VCDisplayCard-3002776b.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-c6a81e42.js → VCDisplayCard2-db880bbb.js} +28 -22
- package/dist/esm/VCDisplayCard2-db880bbb.js.map +1 -0
- package/dist/esm/{VCVerificationPill-d073557c.js → VCVerificationPill-5a05423b.js} +2 -2
- package/dist/esm/{VCVerificationPill-d073557c.js.map → VCVerificationPill-5a05423b.js.map} +1 -1
- package/dist/esm/{VerifierStateBadgeAndText-6946e820.js → VerifierStateBadgeAndText-bd1b0131.js} +9 -11
- package/dist/esm/VerifierStateBadgeAndText-bd1b0131.js.map +1 -0
- package/dist/esm/{credential.helpers-ff461699.js → credential.helpers-26e1a359.js} +3 -3
- package/dist/esm/credential.helpers-26e1a359.js.map +1 -0
- package/dist/esm/{index-2ef835bd.js → index-bc6b8b0b.js} +1 -1
- package/dist/{cjs/index-ec1d26f1.js.map → esm/index-bc6b8b0b.js.map} +1 -1
- package/dist/esm/{index-eae3ca64.js → index-cb3a593b.js} +1 -1
- package/dist/esm/index-cb3a593b.js.map +1 -0
- package/dist/esm/index-cbd2e9db.js +1184 -0
- package/dist/esm/index-cbd2e9db.js.map +1 -0
- package/dist/esm/index.js +18 -17
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index14.js +18 -17
- package/dist/esm/index14.js.map +1 -1
- package/dist/esm/index18.js +2 -2
- package/dist/esm/index22.js +6 -6
- package/dist/esm/index28.js +2 -2
- package/dist/esm/index31.js +2 -1
- package/dist/esm/index31.js.map +1 -1
- package/dist/esm/index39.js +12 -11
- package/dist/esm/index39.js.map +1 -1
- package/dist/esm/index4.js +4 -4
- package/dist/esm/index40.js +5 -5
- package/dist/esm/index41.js +6 -6
- package/dist/esm/index42.js +8 -7
- package/dist/esm/index42.js.map +1 -1
- package/dist/esm/index43.js +2 -2
- package/dist/esm/index46.js +2 -2
- package/dist/esm/index7.js +5 -5
- package/dist/esm/{types.esm-f32fc00a.js → types.esm-13bb929b.js} +3 -2
- package/dist/esm/types.esm-13bb929b.js.map +1 -0
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/package.json +102 -87
- package/src/assets/icons/accommodationsIcon.svg +5 -0
- package/src/assets/icons/accomplishmentsIcon.svg +4 -0
- package/src/assets/icons/achievementsIcon.svg +7 -0
- package/src/assets/icons/coursesIcon.svg +5 -0
- package/src/assets/icons/eventsIcon.svg +6 -0
- package/src/assets/icons/experiencesIcon.svg +4 -0
- package/src/assets/icons/goalsIcon.svg +5 -0
- package/src/assets/icons/idIcon.svg +4 -0
- package/src/assets/icons/membershipsIcon.svg +4 -0
- package/src/assets/icons/relationshipsIcon.svg +6 -0
- package/src/assets/icons/skillsIcon.svg +3 -0
- package/src/assets/icons/socialBadgesIcon.svg +7 -0
- package/src/assets/images/Accommodation-Hands.png +0 -0
- package/src/assets/images/ArrowArcLeft.svg +4 -0
- package/src/assets/images/ArrowArcRight.svg +4 -0
- package/src/assets/images/CaretRight.svg +3 -0
- package/src/assets/images/CaretRightFilled.svg +3 -0
- package/src/assets/images/DotsThreeOutline.svg +5 -0
- package/src/assets/images/GreenCheckCircle.svg +4 -0
- package/src/assets/images/RedXCircle.svg +5 -0
- package/src/assets/images/X.svg +4 -0
- package/src/assets/images/YellowWarningCircle.svg +4 -0
- package/src/assets/images/addawardlight.svg +8 -0
- package/src/assets/images/agriculture.png +0 -0
- package/src/assets/images/apple.png +0 -0
- package/src/assets/images/athletics.png +0 -0
- package/src/assets/images/award.svg +3 -0
- package/src/assets/images/backpack.png +0 -0
- package/src/assets/images/badge.png +0 -0
- package/src/assets/images/briefcase.svg +6 -0
- package/src/assets/images/business.png +0 -0
- package/src/assets/images/card-chip.svg +26 -0
- package/src/assets/images/check.svg +17 -0
- package/src/assets/images/coins.svg +3 -0
- package/src/assets/images/contactless-symbol.svg +3 -0
- package/src/assets/images/creative.png +0 -0
- package/src/assets/images/digital.png +0 -0
- package/src/assets/images/durable.png +0 -0
- package/src/assets/images/emptystate-death.png +0 -0
- package/src/assets/images/emptystate-dinocandle.png +0 -0
- package/src/assets/images/emptystate-ghost1.png +0 -0
- package/src/assets/images/eventsGraphic.png +0 -0
- package/src/assets/images/experience-mountain.png +0 -0
- package/src/assets/images/goals-target.png +0 -0
- package/src/assets/images/gradcaplight.svg +3 -0
- package/src/assets/images/graduation.svg +3 -0
- package/src/assets/images/icon.green.fat-arrow.png +0 -0
- package/src/assets/images/id-purple.png +0 -0
- package/src/assets/images/id-sleeve.png +0 -0
- package/src/assets/images/key-icon.svg +4 -0
- package/src/assets/images/lhplaceholder.png +0 -0
- package/src/assets/images/lightbulb.svg +3 -0
- package/src/assets/images/loveyou-icon.svg +5 -0
- package/src/assets/images/master-card-logo.svg +20 -0
- package/src/assets/images/medical.png +0 -0
- package/src/assets/images/membership-graphic.png +0 -0
- package/src/assets/images/membership-key.svg +9 -0
- package/src/assets/images/minigradcapcolored.svg +3 -0
- package/src/assets/images/minijob.svg +5 -0
- package/src/assets/images/minipuzzle.svg +3 -0
- package/src/assets/images/minipuzzlecolored.svg +3 -0
- package/src/assets/images/minitrophy.svg +3 -0
- package/src/assets/images/minitrophycolored.svg +3 -0
- package/src/assets/images/motlow-buckcard-bg.svg +32 -0
- package/src/assets/images/mountains-icon.svg +4 -0
- package/src/assets/images/photoplaceholder.png +0 -0
- package/src/assets/images/puzzle-icon.svg +3 -0
- package/src/assets/images/relationships-cats.png +0 -0
- package/src/assets/images/sample-badge.png +0 -0
- package/src/assets/images/skillgraph.svg +29 -0
- package/src/assets/images/skillplaceholder.png +0 -0
- package/src/assets/images/social-badge-2.png +0 -0
- package/src/assets/images/social-badge.png +0 -0
- package/src/assets/images/social-icon.svg +7 -0
- package/src/assets/images/social.png +0 -0
- package/src/assets/images/stem.png +0 -0
- package/src/assets/images/target-icon.svg +5 -0
- package/src/assets/images/trade.png +0 -0
- package/src/assets/images/trophy.svg +3 -0
- package/src/assets/images/user.svg +4 -0
- package/src/assets/images/users-icon.svg +6 -0
- package/src/assets/images/vc.check.svg +10 -0
- package/src/assets/images/verified-check.png +0 -0
- package/src/assets/images/walletTrophy.png +0 -0
- package/src/assets/images/walletcurrency.webp +0 -0
- package/src/assets/images/walletids.webp +0 -0
- package/src/assets/images/walletjobhistory.webp +0 -0
- package/src/assets/images/walletskills.webp +0 -0
- package/src/assets/styles/base.css +2 -0
- package/src/assets/styles/main.css +475 -0
- package/src/components/AchievementCard/AchievementCard.stories.tsx +31 -0
- package/src/components/AchievementCard/AchievementCard.tsx +88 -0
- package/src/components/AchievementCard/index.ts +5 -0
- package/src/components/BadgeThumbnailImg/BadgeThumbnailImg.test.tsx +47 -0
- package/src/components/BadgeThumbnailImg/BadgeThumbnailImg.tsx +72 -0
- package/src/components/BadgeThumbnailImg/index.ts +5 -0
- package/src/components/BoostGenericCard/AlignmentSkillsCount.tsx +54 -0
- package/src/components/BoostGenericCard/BoostGenericCard.stories.tsx +39 -0
- package/src/components/BoostGenericCard/BoostGenericCard.tsx +177 -0
- package/src/components/BoostGenericCard/index.ts +6 -0
- package/src/components/BoostSmallCard/BoostSmallCard.stories.tsx +57 -0
- package/src/components/BoostSmallCard/BoostSmallCard.tsx +178 -0
- package/src/components/BoostSmallCard/index.ts +5 -0
- package/src/components/Button/Button.stories.tsx +20 -0
- package/src/components/Button/Button.test.tsx +15 -0
- package/src/components/Button/Button.tsx +21 -0
- package/src/components/Button/index.ts +5 -0
- package/src/components/CertificateDisplayCard/AlignmentRow.tsx +26 -0
- package/src/components/CertificateDisplayCard/AlignmentsBox.tsx +70 -0
- package/src/components/CertificateDisplayCard/CertDisplayCardSkillsCount.tsx +66 -0
- package/src/components/CertificateDisplayCard/CertificateBackFace.tsx +130 -0
- package/src/components/CertificateDisplayCard/CertificateCornerIcon.tsx +48 -0
- package/src/components/CertificateDisplayCard/CertificateDisplayCard.stories.tsx +21 -0
- package/src/components/CertificateDisplayCard/CertificateDisplayCard.tsx +180 -0
- package/src/components/CertificateDisplayCard/CertificateFrontFace.tsx +308 -0
- package/src/components/CertificateDisplayCard/CertificateImageDisplay.test.tsx +43 -0
- package/src/components/CertificateDisplayCard/CertificateImageDisplay.tsx +68 -0
- package/src/components/CertificateDisplayCard/CertificateProfileImageDisplay.test.tsx +66 -0
- package/src/components/CertificateDisplayCard/CertificateProfileImageDisplay.tsx +64 -0
- package/src/components/CertificateDisplayCard/CertificateRibbon.tsx +43 -0
- package/src/components/CertificateDisplayCard/InfoBox.tsx +30 -0
- package/src/components/CertificateDisplayCard/MediaAttachmentsBox.tsx +347 -0
- package/src/components/CertificateDisplayCard/TruncateTextBox.tsx +73 -0
- package/src/components/CertificateDisplayCard/VerificationRow.tsx +67 -0
- package/src/components/CertificateDisplayCard/VerificationsBox.tsx +44 -0
- package/src/components/CertificateDisplayCard/VerifierStateBadgeAndText.tsx +100 -0
- package/src/components/CertificateDisplayCard/index.ts +20 -0
- package/src/components/CircleCheckButton/CircleCheckButton.stories.tsx +21 -0
- package/src/components/CircleCheckButton/CircleCheckButton.tsx +28 -0
- package/src/components/CircleCheckButton/index.ts +5 -0
- package/src/components/CircleIcon/CircleIcon.tsx +90 -0
- package/src/components/CircleIcon/__tests__/CircleIcon.test.tsx +38 -0
- package/src/components/CircleIcon/ci new +0 -0
- package/src/components/CircleIcon/index.ts +5 -0
- package/src/components/CourseCard/CourseCard.stories.tsx +23 -0
- package/src/components/CourseCard/CourseCard.tsx +94 -0
- package/src/components/CourseCard/index.ts +5 -0
- package/src/components/CourseVerticalCard/CourseVerticalCard.stories.tsx +31 -0
- package/src/components/CourseVerticalCard/CourseVerticalCard.tsx +118 -0
- package/src/components/CourseVerticalCard/index.ts +5 -0
- package/src/components/FlippyCard/FlippyCard.tsx +34 -0
- package/src/components/FlippyCard/__tests__/FlippyCard.test.tsx +41 -0
- package/src/components/FlippyCard/index.ts +5 -0
- package/src/components/GenericCard/GenericCard.stories.tsx +22 -0
- package/src/components/GenericCard/GenericCard.tsx +72 -0
- package/src/components/GenericCard/index.ts +5 -0
- package/src/components/JobHistoryCard/JobHistoryCard.stories.tsx +26 -0
- package/src/components/JobHistoryCard/JobHistoryCard.tsx +44 -0
- package/src/components/JobHistoryCard/index.ts +5 -0
- package/src/components/JobListCard/JobListCard.stories.tsx +54 -0
- package/src/components/JobListCard/JobListCard.tsx +162 -0
- package/src/components/JobListCard/index.ts +5 -0
- package/src/components/LearnCardCreditCardBackFace/LearnCardCreditCardBackFace.stories.tsx +31 -0
- package/src/components/LearnCardCreditCardBackFace/LearnCardCreditCardBackFace.tsx +104 -0
- package/src/components/LearnCardCreditCardBackFace/__tests__/LearnCardCreditCardBackFace.test.tsx +64 -0
- package/src/components/LearnCardCreditCardBackFace/index.ts +6 -0
- package/src/components/LearnCardCreditCardBackFace/types.ts +45 -0
- package/src/components/LearnCardCreditCardFrontFace/LearnCardCreditCardFrontFace.stories.tsx +28 -0
- package/src/components/LearnCardCreditCardFrontFace/LearnCardCreditCardFrontFace.tsx +102 -0
- package/src/components/LearnCardCreditCardFrontFace/__tests__/LearnCardCreditCardFrontFace.test.tsx +48 -0
- package/src/components/LearnCardCreditCardFrontFace/index.ts +6 -0
- package/src/components/LearnCardCreditCardFrontFace/types.ts +42 -0
- package/src/components/LearnPill/LearnPill.stories.tsx +20 -0
- package/src/components/LearnPill/LearnPill.tsx +35 -0
- package/src/components/LearnPill/index.ts +5 -0
- package/src/components/Lightbox/Lightbox.tsx +133 -0
- package/src/components/Lightbox/index.ts +5 -0
- package/src/components/Loading/CircleSpinner.tsx +52 -0
- package/src/components/Loading/index.ts +5 -0
- package/src/components/MeritBadgeDisplayCard/AlignmentRow.tsx +26 -0
- package/src/components/MeritBadgeDisplayCard/AlignmentsBox.tsx +70 -0
- package/src/components/MeritBadgeDisplayCard/InfoBox.tsx +30 -0
- package/src/components/MeritBadgeDisplayCard/MediaAttachmentsBox.tsx +347 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeBackFace.tsx +130 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeCornerIcon.tsx +46 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeDisplayCard.tsx +177 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeFrontFace.tsx +292 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeImageDisplay.tsx +22 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeProfileImageDisplay.test.tsx +70 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeProfileImageDisplay.tsx +66 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeRibbon.tsx +185 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeSkillsCount.tsx +47 -0
- package/src/components/MeritBadgeDisplayCard/TruncateTextBox.tsx +73 -0
- package/src/components/MeritBadgeDisplayCard/VerificationRow.tsx +67 -0
- package/src/components/MeritBadgeDisplayCard/VerificationsBox.tsx +44 -0
- package/src/components/MeritBadgeDisplayCard/VerifierStateBadgeAndText.tsx +57 -0
- package/src/components/MeritBadgeDisplayCard/index.ts +20 -0
- package/src/components/MiniVCThumbnail/ MiniVCThumbnail.css +18 -0
- package/src/components/MiniVCThumbnail/ MiniVCThumbnail.stories.tsx +24 -0
- package/src/components/MiniVCThumbnail/MiniVCThumbnail.tsx +83 -0
- package/src/components/MiniVCThumbnail/__tests__/MiniVCThumbnail.test.tsx +59 -0
- package/src/components/MiniVCThumbnail/index.ts +6 -0
- package/src/components/MiniVCThumbnail/types.ts +32 -0
- package/src/components/Notification/Notification.stories.tsx +25 -0
- package/src/components/Notification/Notification.tsx +115 -0
- package/src/components/Notification/__tests__/Notification.test.tsx +111 -0
- package/src/components/Notification/index.ts +6 -0
- package/src/components/Notification/types.ts +97 -0
- package/src/components/NotificationBoostCard/NotificationBoostCard.stories.tsx +54 -0
- package/src/components/NotificationBoostCard/NotificationBoostCard.tsx +153 -0
- package/src/components/NotificationBoostCard/index.ts +6 -0
- package/src/components/NotificationBoostCard/types.ts +25 -0
- package/src/components/NotificationUserAcceptedBoostCard/NotificationUserAcceptedBoostCard.stories.tsx +28 -0
- package/src/components/NotificationUserAcceptedBoostCard/NotificationUserAcceptedBoostCard.tsx +96 -0
- package/src/components/NotificationUserAcceptedBoostCard/index.ts +6 -0
- package/src/components/NotificationUserAcceptedBoostCard/types.ts +13 -0
- package/src/components/NotificationUserCard/NotificationUserCard.stories.tsx +26 -0
- package/src/components/NotificationUserCard/NotificationUserCard.tsx +121 -0
- package/src/components/NotificationUserCard/index.ts +6 -0
- package/src/components/NotificationUserCard/types.ts +43 -0
- package/src/components/QRCodeCard/QRCodeCard.stories.tsx +26 -0
- package/src/components/QRCodeCard/QRCodeCard.tsx +54 -0
- package/src/components/QRCodeCard/__tests__/QRCodeCard.test.tsx +31 -0
- package/src/components/QRCodeCard/index.ts +6 -0
- package/src/components/QRCodeCard/types.ts +22 -0
- package/src/components/RoundedPill/RoundedPill.stories.tsx +21 -0
- package/src/components/RoundedPill/RoundedPill.tsx +137 -0
- package/src/components/RoundedPill/index.ts +5 -0
- package/src/components/RoundedSquare/RoundedSquare.stories.tsx +28 -0
- package/src/components/RoundedSquare/RoundedSquare.tsx +69 -0
- package/src/components/RoundedSquare/__tests__/RoundedSquare.test.tsx +35 -0
- package/src/components/RoundedSquare/constants.ts +63 -0
- package/src/components/RoundedSquare/index.ts +6 -0
- package/src/components/RoundedSquare/roudnedquarenew +0 -0
- package/src/components/SchoolIdCard/SchoolIDCard.stories.tsx +30 -0
- package/src/components/SchoolIdCard/SchoolIDCard.tsx +81 -0
- package/src/components/SchoolIdCard/index.ts +6 -0
- package/src/components/SchoolIdCard/types.ts +42 -0
- package/src/components/SkillTabCard/SkillTabCard.stories.tsx +25 -0
- package/src/components/SkillTabCard/SkillTabCard.tsx +44 -0
- package/src/components/SkillTabCard/index.ts +5 -0
- package/src/components/SkillVerticalCard/SkillVerticalCard.stories.tsx +20 -0
- package/src/components/SkillVerticalCard/SkillVerticalCard.tsx +32 -0
- package/src/components/SkillVerticalCard/index.ts +5 -0
- package/src/components/SkillsCard/SkillsCard.stories.tsx +24 -0
- package/src/components/SkillsCard/SkillsCard.tsx +68 -0
- package/src/components/SkillsCard/index.ts +5 -0
- package/src/components/SkillsStatsCard/SkillsStatsCard.stories.tsx +63 -0
- package/src/components/SkillsStatsCard/SkillsStatsCard.tsx +92 -0
- package/src/components/SkillsStatsCard/index.ts +5 -0
- package/src/components/SmallAchievementCard/SmallAchievementCard.stories.tsx +23 -0
- package/src/components/SmallAchievementCard/SmallAchievementCard.tsx +50 -0
- package/src/components/SmallAchievementCard/index.ts +5 -0
- package/src/components/UserProfilePicture/UserProfilePicture.test.tsx +44 -0
- package/src/components/UserProfilePicture/UserProfilePicture.tsx +119 -0
- package/src/components/UserProfilePicture/index.ts +5 -0
- package/src/components/VCCard/VCCard.stories.tsx +64 -0
- package/src/components/VCCard/VCCard.tsx +84 -0
- package/src/components/VCCard/index.ts +5 -0
- package/src/components/VCDisplayBackFace/VCDisplayBackFace.tsx +112 -0
- package/src/components/VCDisplayBackFace/index.ts +5 -0
- package/src/components/VCDisplayCard/VCDisplayCard.stories.tsx +167 -0
- package/src/components/VCDisplayCard/VCDisplayCard.tsx +98 -0
- package/src/components/VCDisplayCard/index.ts +5 -0
- package/src/components/VCDisplayCard2/FitText.tsx +85 -0
- package/src/components/VCDisplayCard2/InfoBox.tsx +30 -0
- package/src/components/VCDisplayCard2/IssueHistoryBox.tsx +50 -0
- package/src/components/VCDisplayCard2/MediaAttachmentsBox.tsx +306 -0
- package/src/components/VCDisplayCard2/RibbonEnd.tsx +67 -0
- package/src/components/VCDisplayCard2/SelectedSkills.tsx +70 -0
- package/src/components/VCDisplayCard2/SkillsBox.tsx +53 -0
- package/src/components/VCDisplayCard2/Subskill.tsx +50 -0
- package/src/components/VCDisplayCard2/TopLevelSkill.tsx +63 -0
- package/src/components/VCDisplayCard2/TruncateTextBox.tsx +89 -0
- package/src/components/VCDisplayCard2/VC2BackFace.tsx +185 -0
- package/src/components/VCDisplayCard2/VC2FrontFaceInfo.tsx +279 -0
- package/src/components/VCDisplayCard2/VCDisplayCard2.stories.tsx +191 -0
- package/src/components/VCDisplayCard2/VCDisplayCard2.tsx +526 -0
- package/src/components/VCDisplayCard2/VCDisplayCard2AvatarFallbacks.stories.tsx +312 -0
- package/src/components/VCDisplayCard2/VCDisplayCardCategoryType.tsx +19 -0
- package/src/components/VCDisplayCard2/VCDisplayCardSkillsCount.tsx +46 -0
- package/src/components/VCDisplayCard2/VCIDDIsplayCard.tsx +159 -0
- package/src/components/VCDisplayCard2/VCIDDisplayFrontFace.tsx +213 -0
- package/src/components/VCDisplayCard2/VerificationRow.tsx +69 -0
- package/src/components/VCDisplayCard2/VerificationsBox.tsx +44 -0
- package/src/components/VCDisplayCard2/__tests__/VC2FrontFaceInfo.test.tsx +134 -0
- package/src/components/VCDisplayCard2/index.ts +23 -0
- package/src/components/VCDisplayFrontFace/VCDisplayFrontFace.tsx +143 -0
- package/src/components/VCDisplayFrontFace/index.ts +5 -0
- package/src/components/VCThumbnail/VCThumbnail.stories.tsx +32 -0
- package/src/components/VCThumbnail/VCThumbnail.tsx +182 -0
- package/src/components/VCThumbnail/__tests__/VCThumbnail.test.tsx +114 -0
- package/src/components/VCThumbnail/index.ts +6 -0
- package/src/components/VCThumbnail/types.ts +46 -0
- package/src/components/VCVerificationCheck/VCVerificationCheck.tsx +89 -0
- package/src/components/VCVerificationCheck/index.ts +5 -0
- package/src/components/VCVerificationPill/VCVerificationPill.tsx +85 -0
- package/src/components/VCVerificationPill/index.ts +5 -0
- package/src/components/index.ts +48 -0
- package/src/components/svgs/AccommodationsIcon.tsx +38 -0
- package/src/components/svgs/AccomplishmentsIcon.tsx +34 -0
- package/src/components/svgs/AchievementWithTitle.tsx +137 -0
- package/src/components/svgs/AcuteCheckmark.tsx +25 -0
- package/src/components/svgs/AwardDisplayIcon.tsx +37 -0
- package/src/components/svgs/AwardRibbon.tsx +29 -0
- package/src/components/svgs/BadgeDisplayIcon.tsx +31 -0
- package/src/components/svgs/Briefcase.tsx +48 -0
- package/src/components/svgs/Camera.tsx +25 -0
- package/src/components/svgs/CertificateDisplayIcon.tsx +56 -0
- package/src/components/svgs/Checkmark.tsx +59 -0
- package/src/components/svgs/CircleWithText.tsx +36 -0
- package/src/components/svgs/Coins.tsx +14 -0
- package/src/components/svgs/CourseDisplayIcon.tsx +43 -0
- package/src/components/svgs/DownRightArrow.tsx +29 -0
- package/src/components/svgs/ExclamationPoint.tsx +25 -0
- package/src/components/svgs/ExperienceIcon.tsx +34 -0
- package/src/components/svgs/FatArrow.tsx +44 -0
- package/src/components/svgs/GenericArrow.tsx +29 -0
- package/src/components/svgs/GenericDocumentIcon.tsx +26 -0
- package/src/components/svgs/Graduation.tsx +24 -0
- package/src/components/svgs/IDDisplayIcon.tsx +63 -0
- package/src/components/svgs/IDIcon.tsx +59 -0
- package/src/components/svgs/IDSleeve.tsx +21 -0
- package/src/components/svgs/InfoIcon.tsx +26 -0
- package/src/components/svgs/IssuerSeal.tsx +26 -0
- package/src/components/svgs/KeyIcon.tsx +31 -0
- package/src/components/svgs/LeftArrow.tsx +27 -0
- package/src/components/svgs/Lightbulb.tsx +14 -0
- package/src/components/svgs/Line.tsx +22 -0
- package/src/components/svgs/LinkIcon.tsx +35 -0
- package/src/components/svgs/PdfIcon.tsx +38 -0
- package/src/components/svgs/PersonBadge.tsx +55 -0
- package/src/components/svgs/PuzzlePiece.tsx +89 -0
- package/src/components/svgs/QRCodeIcon.tsx +21 -0
- package/src/components/svgs/RedFlag.tsx +41 -0
- package/src/components/svgs/RoundedCorner.tsx +28 -0
- package/src/components/svgs/RoundedX.tsx +35 -0
- package/src/components/svgs/ScoutsLogo.tsx +41 -0
- package/src/components/svgs/ScoutsPledge.tsx +33 -0
- package/src/components/svgs/ShieldChevron.tsx +24 -0
- package/src/components/svgs/Smiley.tsx +43 -0
- package/src/components/svgs/SocialBadgesIcon.tsx +43 -0
- package/src/components/svgs/ThreeDotVertical.tsx +41 -0
- package/src/components/svgs/Trophy.tsx +25 -0
- package/src/components/svgs/UnknownVerifierBadge.tsx +25 -0
- package/src/components/svgs/User.tsx +34 -0
- package/src/components/svgs/VerifiedBadge.tsx +37 -0
- package/src/components/svgs/VideoIcon.tsx +28 -0
- package/src/components/svgs/X.tsx +35 -0
- package/src/components/svgs/index.ts +54 -0
- package/src/constants/icons.ts +87 -0
- package/src/constants/index.ts +109 -0
- package/src/constants/notifications.ts +14 -0
- package/src/constants/skills.ts +2202 -0
- package/src/declaration.d.ts +21 -0
- package/src/helpers/__tests__/credentialFormat.helpers.test.ts +100 -0
- package/src/helpers/color.helpers.ts +35 -0
- package/src/helpers/credential.helpers.test.ts +108 -0
- package/src/helpers/credential.helpers.tsx +249 -0
- package/src/helpers/credentialFormat.helpers.ts +68 -0
- package/src/helpers/did-display.helpers.ts +230 -0
- package/src/helpers/display.helpers.ts +53 -0
- package/src/helpers/string.helpers.ts +7 -0
- package/src/helpers/test.helpers.ts +680 -0
- package/src/helpers/url.helpers.ts +3 -0
- package/src/helpers/useHorizontalPages.ts +130 -0
- package/src/helpers/useOnMomentumScrollEnd.ts +28 -0
- package/src/helpers/useScrollBorders.ts +59 -0
- package/src/helpers/video.helpers.ts +125 -0
- package/src/hooks/useCredentialFormat.tsx +23 -0
- package/src/hooks/useParsedSdJwtVc.tsx +64 -0
- package/src/index.ts +16 -0
- package/src/types/index.ts +390 -0
- package/LICENSE +0 -21
- package/dist/cjs/SchoolIDCard-e22d0d80.js.map +0 -1
- package/dist/cjs/VCDisplayCard2-6c87eade.js.map +0 -1
- package/dist/cjs/VerifierStateBadgeAndText-5229da1a.js.map +0 -1
- package/dist/cjs/credential.helpers-473e89c5.js.map +0 -1
- package/dist/cjs/index-0cac2c5b.js.map +0 -1
- package/dist/cjs/types.esm-12bb5eed.js.map +0 -1
- package/dist/esm/SchoolIDCard-8b151cd3.js.map +0 -1
- package/dist/esm/VCDisplayCard2-c6a81e42.js.map +0 -1
- package/dist/esm/VerifierStateBadgeAndText-6946e820.js.map +0 -1
- package/dist/esm/credential.helpers-ff461699.js.map +0 -1
- package/dist/esm/index-2ef835bd.js.map +0 -1
- package/dist/esm/index-eae3ca64.js.map +0 -1
- package/dist/esm/types.esm-f32fc00a.js.map +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
|
+
import { render, fireEvent } from '@testing-library/react';
|
|
5
|
+
|
|
6
|
+
import MiniVCThumbnail from '../MiniVCThumbnail';
|
|
7
|
+
|
|
8
|
+
describe('Running Tests for MiniVCThumbnail', () => {
|
|
9
|
+
test('Checks MiniVCThumbnail renders with props', () => {
|
|
10
|
+
const handleOnClick = vi.fn();
|
|
11
|
+
|
|
12
|
+
const { getByTestId, getByAltText } = render(
|
|
13
|
+
<MiniVCThumbnail
|
|
14
|
+
title="This is a title!"
|
|
15
|
+
createdAt="05/01/2022"
|
|
16
|
+
issuerImage="https://issuerimage.png"
|
|
17
|
+
badgeImage="https://badgeimage.png"
|
|
18
|
+
listView={false}
|
|
19
|
+
onClick={handleOnClick}
|
|
20
|
+
/>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
fireEvent.click(getByTestId('mini-vc-thumbnail'));
|
|
24
|
+
expect(handleOnClick).toHaveBeenCalledTimes(1);
|
|
25
|
+
|
|
26
|
+
const title = getByTestId('mini-vc-thumbnail-title');
|
|
27
|
+
expect(title).toHaveTextContent('This is a title!');
|
|
28
|
+
|
|
29
|
+
const createdAt = getByTestId('mini-vc-thumbnail-createdAt');
|
|
30
|
+
expect(createdAt).toHaveTextContent('05/01/2022');
|
|
31
|
+
|
|
32
|
+
const issuerImage = getByAltText('issuer image');
|
|
33
|
+
expect(issuerImage).toHaveAttribute('src', 'https://issuerimage.png');
|
|
34
|
+
|
|
35
|
+
const badgeImage = getByAltText('badge image');
|
|
36
|
+
expect(badgeImage).toHaveAttribute('src', 'https://badgeimage.png');
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test('Checks MiniVCThumbnail renders without props', () => {
|
|
40
|
+
const handleOnClick = vi.fn();
|
|
41
|
+
|
|
42
|
+
const { getByTestId, queryByTestId } = render(<MiniVCThumbnail />);
|
|
43
|
+
|
|
44
|
+
fireEvent.click(getByTestId('mini-vc-thumbnail'));
|
|
45
|
+
expect(handleOnClick).not.toHaveBeenCalledTimes(1);
|
|
46
|
+
|
|
47
|
+
const title = getByTestId('mini-vc-thumbnail-title');
|
|
48
|
+
expect(title).toBeEmptyDOMElement();
|
|
49
|
+
|
|
50
|
+
const createdAt = getByTestId('mini-vc-thumbnail-createdAt');
|
|
51
|
+
expect(createdAt).toBeEmptyDOMElement();
|
|
52
|
+
|
|
53
|
+
const issuerImage = queryByTestId('mini-vc-thumbnail-issuer');
|
|
54
|
+
expect(issuerImage).not.toBeInTheDocument();
|
|
55
|
+
|
|
56
|
+
const badgeImage = queryByTestId('mini-vc-thumbnail-badge');
|
|
57
|
+
expect(badgeImage).not.toBeInTheDocument();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type MiniVCThumbnailProps = {
|
|
2
|
+
/**
|
|
3
|
+
* thumbnail title
|
|
4
|
+
* @type {string}
|
|
5
|
+
*/
|
|
6
|
+
title?: string;
|
|
7
|
+
/**
|
|
8
|
+
* issue date
|
|
9
|
+
* @type {string}
|
|
10
|
+
*/
|
|
11
|
+
createdAt?: string;
|
|
12
|
+
/**
|
|
13
|
+
* issuer image
|
|
14
|
+
* @type {string}
|
|
15
|
+
*/
|
|
16
|
+
issuerImage?: string;
|
|
17
|
+
/**
|
|
18
|
+
* badge image
|
|
19
|
+
* @type {string}
|
|
20
|
+
*/
|
|
21
|
+
badgeImage?: string;
|
|
22
|
+
/**
|
|
23
|
+
* custom className
|
|
24
|
+
* @type {string}
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {function}
|
|
30
|
+
*/
|
|
31
|
+
onClick?: () => void;
|
|
32
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story, Meta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import Notification from './Notification';
|
|
5
|
+
import { NotificationProps } from './types';
|
|
6
|
+
import { NotificationTypeEnum } from '../../constants/notifications';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Notification',
|
|
10
|
+
component: Notification,
|
|
11
|
+
argTypes: {},
|
|
12
|
+
} as Meta<typeof Notification>;
|
|
13
|
+
|
|
14
|
+
const Template: Story<NotificationProps> = args => <Notification {...args} />;
|
|
15
|
+
|
|
16
|
+
export const NotificationTest = Template.bind({});
|
|
17
|
+
NotificationTest.args = {
|
|
18
|
+
title: 'Title of Credential',
|
|
19
|
+
issuerImage:
|
|
20
|
+
'https://upload.wikimedia.org/wikipedia/en/thumb/a/a8/Jack_Daniels_Logo.svg/1200px-Jack_Daniels_Logo.svg.png',
|
|
21
|
+
issuerName: "Jack Daniel's",
|
|
22
|
+
issueDate: '04 Apr 2022',
|
|
23
|
+
className: '',
|
|
24
|
+
notificationType: NotificationTypeEnum.SocialBadges,
|
|
25
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
import { NotificationProps, NotificationTypeStyles } from './types';
|
|
4
|
+
import { NotificationTypeEnum } from '../../constants/notifications';
|
|
5
|
+
|
|
6
|
+
import Checkmark from '../svgs/Checkmark';
|
|
7
|
+
|
|
8
|
+
export const Notification: React.FC<NotificationProps> = ({
|
|
9
|
+
title,
|
|
10
|
+
issuerImage,
|
|
11
|
+
issueDate,
|
|
12
|
+
className,
|
|
13
|
+
notificationType = NotificationTypeEnum.Achievement,
|
|
14
|
+
handleViewOnClick = () => {},
|
|
15
|
+
claimStatus = false,
|
|
16
|
+
handleClaimOnClick = () => {},
|
|
17
|
+
loadingState = false,
|
|
18
|
+
}) => {
|
|
19
|
+
const [isClaimed, setIsClaimed] = useState<boolean>(claimStatus || false);
|
|
20
|
+
const [isLoading, setIsLoading] = useState<boolean>(loadingState || false);
|
|
21
|
+
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
setIsClaimed(claimStatus);
|
|
24
|
+
}, [claimStatus]);
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
setIsLoading(loadingState);
|
|
28
|
+
}, [loadingState]);
|
|
29
|
+
|
|
30
|
+
const {
|
|
31
|
+
IconComponent,
|
|
32
|
+
iconCircleStyles,
|
|
33
|
+
textStyles,
|
|
34
|
+
viewButtonStyles,
|
|
35
|
+
claimedButtonStyles,
|
|
36
|
+
unclaimedButtonStyles,
|
|
37
|
+
typeText,
|
|
38
|
+
} = NotificationTypeStyles[notificationType];
|
|
39
|
+
|
|
40
|
+
const claimButtonStyles = isClaimed ? claimedButtonStyles : unclaimedButtonStyles;
|
|
41
|
+
|
|
42
|
+
let buttonText: string = '';
|
|
43
|
+
|
|
44
|
+
if (isClaimed) {
|
|
45
|
+
buttonText = 'Claimed';
|
|
46
|
+
} else if (!isClaimed) {
|
|
47
|
+
buttonText = 'Claim';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div
|
|
52
|
+
className={`flex justify-center items-center relative w-full rounded-3xl shadow-2xl py-3 bg-white ${className}`}
|
|
53
|
+
>
|
|
54
|
+
<div
|
|
55
|
+
className={`absolute flex items-center justify-center top-2 right-2 h-8 w-8 overflow-hidden rounded-full z-10 ${iconCircleStyles}`}
|
|
56
|
+
>
|
|
57
|
+
<IconComponent className="h-4/5 text-white" />
|
|
58
|
+
</div>
|
|
59
|
+
<div className="flex flex-col justify-center items-center relative w-11/12">
|
|
60
|
+
<div className="flex flex-row items-center justify-start w-full">
|
|
61
|
+
<div
|
|
62
|
+
className={`h-12 w-12 max-h-12 max-w-[48px] min-h-[48px] min-w-[48px] overflow-hidden rounded-full ${iconCircleStyles}`}
|
|
63
|
+
>
|
|
64
|
+
<img
|
|
65
|
+
src={issuerImage}
|
|
66
|
+
alt="issuer image"
|
|
67
|
+
className="w-full h-full object-cover"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
<div className="text-left ml-3">
|
|
71
|
+
<h4
|
|
72
|
+
className="font-bold tracking-wide line-clamp-1 text-black"
|
|
73
|
+
data-testid="notification-title"
|
|
74
|
+
>
|
|
75
|
+
{title}
|
|
76
|
+
</h4>
|
|
77
|
+
<p
|
|
78
|
+
className={`font-semibold p-0 m-0 leading-none tracking-wide line-clamp-1 ${textStyles}`}
|
|
79
|
+
data-testid="notification-type"
|
|
80
|
+
>
|
|
81
|
+
{typeText}{' '}
|
|
82
|
+
<span
|
|
83
|
+
className="text-grayscale-600 normal-case font-normal text-sm"
|
|
84
|
+
data-testid="notification-cred-issue-date"
|
|
85
|
+
>
|
|
86
|
+
• {issueDate}
|
|
87
|
+
</span>
|
|
88
|
+
</p>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
<div className="flex items-center justify-between w-full mt-3">
|
|
92
|
+
<button
|
|
93
|
+
onClick={handleViewOnClick}
|
|
94
|
+
className={`flex-1 rounded-[24px] border-solid border-2 bg-white font-semibold mr-2 py-2 px-3 tracking-wide ${viewButtonStyles}`}
|
|
95
|
+
role="button"
|
|
96
|
+
name="notification-view-button"
|
|
97
|
+
>
|
|
98
|
+
View
|
|
99
|
+
</button>
|
|
100
|
+
<button
|
|
101
|
+
className={`flex items-center justify-center flex-1 rounded-[24px] border-2 border-solid font-semibold py-2 px-3 tracking-wide ${claimButtonStyles}`}
|
|
102
|
+
onClick={handleClaimOnClick}
|
|
103
|
+
role="button"
|
|
104
|
+
name="notification-claim-button"
|
|
105
|
+
>
|
|
106
|
+
{isClaimed && <Checkmark className="h-[24px] p-0 m-0" />}{' '}
|
|
107
|
+
{isLoading ? 'Loading...' : buttonText}
|
|
108
|
+
</button>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export default Notification;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '@testing-library/jest-dom';
|
|
3
|
+
import { render, screen } from '@testing-library/react';
|
|
4
|
+
|
|
5
|
+
import Notification from '../Notification';
|
|
6
|
+
import { NotificationTypeStyles } from '../types';
|
|
7
|
+
import { NotificationTypeEnum } from '../../../constants/notifications';
|
|
8
|
+
|
|
9
|
+
describe('Notification', () => {
|
|
10
|
+
it('Renders Notification of Type: Currency with props', () => {
|
|
11
|
+
render(
|
|
12
|
+
<Notification
|
|
13
|
+
title="Title of Credential"
|
|
14
|
+
issuerImage="https://issuerimage.png"
|
|
15
|
+
issueDate="04 Apr 22"
|
|
16
|
+
notificationType={NotificationTypeEnum.Currency}
|
|
17
|
+
claimStatus={false}
|
|
18
|
+
loadingState={false}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const typeText = NotificationTypeStyles?.[NotificationTypeEnum.Currency]?.typeText;
|
|
23
|
+
|
|
24
|
+
const title = screen.getByTestId('notification-title');
|
|
25
|
+
expect(title).toHaveTextContent('Title of Credential');
|
|
26
|
+
|
|
27
|
+
const credIssueDate = screen.getByTestId('notification-cred-issue-date');
|
|
28
|
+
expect(credIssueDate).toHaveTextContent('04 Apr 22');
|
|
29
|
+
|
|
30
|
+
const issuerImage = screen.getByAltText('issuer image');
|
|
31
|
+
expect(issuerImage).toHaveAttribute('src', 'https://issuerimage.png');
|
|
32
|
+
|
|
33
|
+
const notificationType = screen.getByTestId('notification-type');
|
|
34
|
+
expect(notificationType).toHaveTextContent(typeText);
|
|
35
|
+
|
|
36
|
+
const iconComponent = screen.getByTestId(`${NotificationTypeEnum.Currency}-icon`);
|
|
37
|
+
expect(iconComponent).toBeInTheDocument();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('Renders Notification of Type: Identification', () => {
|
|
41
|
+
render(<Notification notificationType={NotificationTypeEnum.ID} />);
|
|
42
|
+
|
|
43
|
+
const typeText = NotificationTypeStyles?.[NotificationTypeEnum.ID]?.typeText;
|
|
44
|
+
|
|
45
|
+
const notificationType = screen.getByTestId('notification-type');
|
|
46
|
+
expect(notificationType).toHaveTextContent(typeText);
|
|
47
|
+
|
|
48
|
+
const iconComponent = screen.getByTestId(`${NotificationTypeEnum.ID}-icon`);
|
|
49
|
+
expect(iconComponent).toBeInTheDocument();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('Renders Notification of Type: Achievement', () => {
|
|
53
|
+
render(<Notification notificationType={NotificationTypeEnum.Achievement} />);
|
|
54
|
+
|
|
55
|
+
const typeText = NotificationTypeStyles?.[NotificationTypeEnum.Achievement]?.typeText;
|
|
56
|
+
|
|
57
|
+
const notificationType = screen.getByTestId('notification-type');
|
|
58
|
+
expect(notificationType).toHaveTextContent(typeText);
|
|
59
|
+
|
|
60
|
+
const iconComponent = screen.getByTestId(`${NotificationTypeEnum.Achievement}-icon`);
|
|
61
|
+
expect(iconComponent).toBeInTheDocument();
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('Renders Notification of Type: Skill', () => {
|
|
65
|
+
render(<Notification notificationType={NotificationTypeEnum.Skill} />);
|
|
66
|
+
|
|
67
|
+
const typeText = NotificationTypeStyles?.[NotificationTypeEnum.Skill]?.typeText;
|
|
68
|
+
|
|
69
|
+
const notificationType = screen.getByTestId('notification-type');
|
|
70
|
+
expect(notificationType).toHaveTextContent(typeText);
|
|
71
|
+
|
|
72
|
+
const iconComponent = screen.getByTestId(`${NotificationTypeEnum.Skill}-icon`);
|
|
73
|
+
expect(iconComponent).toBeInTheDocument();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it('Renders Notification of Type: Job', () => {
|
|
77
|
+
render(<Notification notificationType={NotificationTypeEnum.Job} />);
|
|
78
|
+
|
|
79
|
+
const typeText = NotificationTypeStyles?.[NotificationTypeEnum.Job]?.typeText;
|
|
80
|
+
|
|
81
|
+
const notificationType = screen.getByTestId('notification-type');
|
|
82
|
+
expect(notificationType).toHaveTextContent(typeText);
|
|
83
|
+
|
|
84
|
+
const iconComponent = screen.getByTestId(`${NotificationTypeEnum.Job}-icon`);
|
|
85
|
+
expect(iconComponent).toBeInTheDocument();
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it('Renders Notification of Type: Learning', () => {
|
|
89
|
+
render(<Notification notificationType={NotificationTypeEnum.Learning} />);
|
|
90
|
+
|
|
91
|
+
const typeText = NotificationTypeStyles?.[NotificationTypeEnum.Learning]?.typeText;
|
|
92
|
+
|
|
93
|
+
const notificationType = screen.getByTestId('notification-type');
|
|
94
|
+
expect(notificationType).toHaveTextContent(typeText);
|
|
95
|
+
|
|
96
|
+
const iconComponent = screen.getByTestId(`${NotificationTypeEnum.Learning}-icon`);
|
|
97
|
+
expect(iconComponent).toBeInTheDocument();
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it('Renders Notification of Type: Social Badge', () => {
|
|
101
|
+
render(<Notification notificationType={NotificationTypeEnum.SocialBadges} />);
|
|
102
|
+
|
|
103
|
+
const typeText = NotificationTypeStyles?.[NotificationTypeEnum.SocialBadges]?.typeText;
|
|
104
|
+
|
|
105
|
+
const notificationType = screen.getByTestId('notification-type');
|
|
106
|
+
expect(notificationType).toHaveTextContent(typeText);
|
|
107
|
+
|
|
108
|
+
const iconComponent = screen.getByTestId(`${NotificationTypeEnum.SocialBadges}-icon`);
|
|
109
|
+
expect(iconComponent).toBeInTheDocument();
|
|
110
|
+
});
|
|
111
|
+
});
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { NotificationTypeEnum } from '../../constants/notifications';
|
|
2
|
+
|
|
3
|
+
import Trophy from '../svgs/Trophy';
|
|
4
|
+
import Coins from '../svgs/Coins';
|
|
5
|
+
import User from '../svgs/User';
|
|
6
|
+
import Briefcase from '../svgs/Briefcase';
|
|
7
|
+
import PuzzlePiece from '../svgs/PuzzlePiece';
|
|
8
|
+
import Graduation from '../svgs/Graduation';
|
|
9
|
+
import ShieldChevron from '../svgs/ShieldChevron';
|
|
10
|
+
|
|
11
|
+
export type NotificationProps = {
|
|
12
|
+
notificationType: NotificationTypeEnum;
|
|
13
|
+
title: string;
|
|
14
|
+
issuerImage?: string;
|
|
15
|
+
issueDate: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
handleViewOnClick: () => void;
|
|
18
|
+
claimStatus: boolean;
|
|
19
|
+
handleClaimOnClick: () => void;
|
|
20
|
+
loadingState: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const NotificationTypeStyles: {
|
|
24
|
+
[key: NotificationTypeEnum | string]: {
|
|
25
|
+
viewButtonStyles: string;
|
|
26
|
+
unclaimedButtonStyles: string;
|
|
27
|
+
claimedButtonStyles: string;
|
|
28
|
+
textStyles: string;
|
|
29
|
+
iconCircleStyles: string;
|
|
30
|
+
IconComponent: any;
|
|
31
|
+
typeText: string;
|
|
32
|
+
};
|
|
33
|
+
} = {
|
|
34
|
+
[NotificationTypeEnum.Currency]: {
|
|
35
|
+
viewButtonStyles: 'border-cyan-400 text-cyan-400',
|
|
36
|
+
unclaimedButtonStyles: 'text-white bg-cyan-400 border-cyan-400 shadow-bottom',
|
|
37
|
+
claimedButtonStyles: 'text-cyan-400 bg-cyan-50 border-cyan-50',
|
|
38
|
+
textStyles: 'text-cyan-400 capitalize',
|
|
39
|
+
iconCircleStyles: 'bg-cyan-400',
|
|
40
|
+
IconComponent: Coins,
|
|
41
|
+
typeText: 'Currency',
|
|
42
|
+
},
|
|
43
|
+
[NotificationTypeEnum.SocialBadges]: {
|
|
44
|
+
viewButtonStyles: 'border-cyan-400 text-cyan-400',
|
|
45
|
+
unclaimedButtonStyles: 'text-white bg-cyan-400 border-cyan-400 shadow-bottom',
|
|
46
|
+
claimedButtonStyles: 'text-cyan-400 bg-cyan-50 border-cyan-50',
|
|
47
|
+
textStyles: 'text-cyan-400 capitalize',
|
|
48
|
+
iconCircleStyles: 'bg-cyan-400',
|
|
49
|
+
IconComponent: ShieldChevron,
|
|
50
|
+
typeText: 'Social Badge',
|
|
51
|
+
},
|
|
52
|
+
[NotificationTypeEnum.ID]: {
|
|
53
|
+
viewButtonStyles: 'border-yellow-400 text-yellow-400',
|
|
54
|
+
unclaimedButtonStyles: 'text-white bg-yellow-400 border-yellow-400 shadow-bottom',
|
|
55
|
+
claimedButtonStyles: 'text-yellow-400 bg-yellow-50 border-yellow-50',
|
|
56
|
+
textStyles: 'text-yellow-400 uppercase',
|
|
57
|
+
iconCircleStyles: 'bg-yellow-400',
|
|
58
|
+
IconComponent: User,
|
|
59
|
+
typeText: 'ID',
|
|
60
|
+
},
|
|
61
|
+
[NotificationTypeEnum.Achievement]: {
|
|
62
|
+
viewButtonStyles: 'border-spice-600 text-spice-400',
|
|
63
|
+
unclaimedButtonStyles: 'text-white bg-spice-400 border-spice-400 shadow-bottom',
|
|
64
|
+
claimedButtonStyles: 'text-spice-400 bg-spice-50 border-spice-50',
|
|
65
|
+
textStyles: 'text-spice-400 capitalize',
|
|
66
|
+
iconCircleStyles: 'bg-spice-400',
|
|
67
|
+
IconComponent: Trophy,
|
|
68
|
+
typeText: 'Achievement',
|
|
69
|
+
},
|
|
70
|
+
[NotificationTypeEnum.Skill]: {
|
|
71
|
+
viewButtonStyles: 'border-indigo-400 text-indigo-400',
|
|
72
|
+
unclaimedButtonStyles: 'text-white bg-indigo-400 border-indigo-400 shadow-bottom',
|
|
73
|
+
claimedButtonStyles: 'text-indigo-400 bg-indigo-50 border-indigo-50',
|
|
74
|
+
textStyles: 'text-indigo-400 capitalize',
|
|
75
|
+
iconCircleStyles: 'bg-indigo-400',
|
|
76
|
+
IconComponent: PuzzlePiece,
|
|
77
|
+
typeText: 'Skill',
|
|
78
|
+
},
|
|
79
|
+
[NotificationTypeEnum.Job]: {
|
|
80
|
+
viewButtonStyles: 'border-rose-400 text-rose-400',
|
|
81
|
+
unclaimedButtonStyles: 'text-white bg-rose-400 border-rose-400 shadow-bottom',
|
|
82
|
+
claimedButtonStyles: 'text-rose-400 bg-rose-50 border-rose-50',
|
|
83
|
+
textStyles: 'text-rose-400 capitalize',
|
|
84
|
+
iconCircleStyles: 'bg-rose-400',
|
|
85
|
+
IconComponent: Briefcase,
|
|
86
|
+
typeText: 'Work History',
|
|
87
|
+
},
|
|
88
|
+
[NotificationTypeEnum.Learning]: {
|
|
89
|
+
viewButtonStyles: 'border-emerald-500 text-emerald-500',
|
|
90
|
+
unclaimedButtonStyles: 'text-white bg-emerald-500 border-emerald-500 shadow-bottom',
|
|
91
|
+
claimedButtonStyles: 'text-emerald-500 bg-emerald-50 border-emerald-50',
|
|
92
|
+
textStyles: 'text-emerald-500 capitalize',
|
|
93
|
+
iconCircleStyles: 'bg-emerald-500',
|
|
94
|
+
IconComponent: Graduation,
|
|
95
|
+
typeText: 'Learning History',
|
|
96
|
+
},
|
|
97
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story, Meta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import NotificationBoostCard from './NotificationBoostCard';
|
|
5
|
+
import { NotificationBoostCardProps } from './types';
|
|
6
|
+
import { NotificationTypeEnum } from '../../constants/notifications';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'NotificationBoostCard',
|
|
10
|
+
component: NotificationBoostCard,
|
|
11
|
+
argTypes: {},
|
|
12
|
+
} as Meta<typeof NotificationBoostCard>;
|
|
13
|
+
|
|
14
|
+
const Template: Story<NotificationBoostCardProps> = args => <NotificationBoostCard {...args} />;
|
|
15
|
+
|
|
16
|
+
export const NotificationCardTest = Template.bind({});
|
|
17
|
+
|
|
18
|
+
NotificationCardTest.args = {
|
|
19
|
+
title: 'Title of Credential',
|
|
20
|
+
thumbImage:
|
|
21
|
+
'https://upload.wikimedia.org/wikipedia/en/thumb/a/a8/Jack_Daniels_Logo.svg/1200px-Jack_Daniels_Logo.svg.png',
|
|
22
|
+
issuerInfo: {
|
|
23
|
+
image: 'https://picsum.photos/200',
|
|
24
|
+
fullName: 'Bobby Baggins',
|
|
25
|
+
displayName: 'BBaggins',
|
|
26
|
+
},
|
|
27
|
+
className: 'notification-boost-card-test',
|
|
28
|
+
issueDate: 'Apr 04 2022',
|
|
29
|
+
notificationType: NotificationTypeEnum.SocialBadges,
|
|
30
|
+
handleButtonClick: () => console.log('BUTTON CLICK'),
|
|
31
|
+
handleCardClick: () => console.log('CARD CLICK'),
|
|
32
|
+
handleCancelClick: () => console.log('///CANCEL CLICK'),
|
|
33
|
+
isArchived: false,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const NotificationCardTestNoIssuerImage = Template.bind({});
|
|
37
|
+
|
|
38
|
+
NotificationCardTestNoIssuerImage.args = {
|
|
39
|
+
title: 'Title of Credential',
|
|
40
|
+
thumbImage:
|
|
41
|
+
'https://upload.wikimedia.org/wikipedia/en/thumb/a/a8/Jack_Daniels_Logo.svg/1200px-Jack_Daniels_Logo.svg.png',
|
|
42
|
+
issuerInfo: {
|
|
43
|
+
image: '',
|
|
44
|
+
fullName: 'Bobby Baggins',
|
|
45
|
+
displayName: 'BBaggins',
|
|
46
|
+
},
|
|
47
|
+
className: 'notification-boost-card-test',
|
|
48
|
+
issueDate: 'Apr 04 2022',
|
|
49
|
+
notificationType: NotificationTypeEnum.SocialBadges,
|
|
50
|
+
handleButtonClick: () => console.log('BUTTON CLICK'),
|
|
51
|
+
handleCardClick: () => console.log('CARD CLICK'),
|
|
52
|
+
handleCancelClick: () => console.log('///CANCEL CLICK'),
|
|
53
|
+
isArchived: false,
|
|
54
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import X from '../../assets/images/X.svg';
|
|
3
|
+
import { NotificationBoostCardProps } from './types';
|
|
4
|
+
import { NotificationTypeStyles } from '../Notification/types';
|
|
5
|
+
import { NotificationTypeEnum } from '../../constants/notifications';
|
|
6
|
+
import Checkmark from '../svgs/Checkmark';
|
|
7
|
+
import ArrowArcLeft from '../../assets/images/ArrowArcLeft.svg';
|
|
8
|
+
import UserProfilePicture from '../UserProfilePicture/UserProfilePicture';
|
|
9
|
+
|
|
10
|
+
export const NotificationBoostCard: React.FC<NotificationBoostCardProps> = ({
|
|
11
|
+
title,
|
|
12
|
+
customThumbComponent,
|
|
13
|
+
className,
|
|
14
|
+
thumbImage,
|
|
15
|
+
notificationType = NotificationTypeEnum.Achievement,
|
|
16
|
+
issueDate,
|
|
17
|
+
issuerInfo,
|
|
18
|
+
claimStatus = false,
|
|
19
|
+
loadingState = false,
|
|
20
|
+
handleButtonClick,
|
|
21
|
+
handleCancelClick,
|
|
22
|
+
handleCardClick,
|
|
23
|
+
showIssuerInfo = true,
|
|
24
|
+
isArchived,
|
|
25
|
+
}) => {
|
|
26
|
+
const [isClaimed, setIsClaimed] = useState<boolean>(claimStatus || false);
|
|
27
|
+
const [isLoading, setIsLoading] = useState<boolean>(loadingState || false);
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
setIsClaimed(claimStatus);
|
|
31
|
+
}, [claimStatus]);
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
setIsLoading(loadingState);
|
|
35
|
+
}, [loadingState]);
|
|
36
|
+
|
|
37
|
+
const {
|
|
38
|
+
iconCircleStyles,
|
|
39
|
+
textStyles,
|
|
40
|
+
viewButtonStyles,
|
|
41
|
+
claimedButtonStyles,
|
|
42
|
+
unclaimedButtonStyles,
|
|
43
|
+
typeText,
|
|
44
|
+
} = NotificationTypeStyles[notificationType];
|
|
45
|
+
|
|
46
|
+
const claimButtonStyles = isClaimed ? claimedButtonStyles : unclaimedButtonStyles;
|
|
47
|
+
|
|
48
|
+
let buttonText: string = '';
|
|
49
|
+
|
|
50
|
+
if (isClaimed) {
|
|
51
|
+
buttonText = 'Claimed';
|
|
52
|
+
} else if (!isClaimed) {
|
|
53
|
+
buttonText = 'Claim';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div
|
|
58
|
+
className={`flex justify-start max-w-[600px] items-start relative w-full rounded-3xl shadow-bottom py-[10px] px-[10px] bg-white ${className}`}
|
|
59
|
+
>
|
|
60
|
+
<div className="notification-card-left-side px-[0px] flex">
|
|
61
|
+
{!customThumbComponent && (
|
|
62
|
+
<div
|
|
63
|
+
onClick={handleCardClick}
|
|
64
|
+
className={`overflow-hidden cursor-pointer w-[90px] h-[90px] rounded-full flex items-start ${iconCircleStyles} notification-card-thumbnail`}
|
|
65
|
+
>
|
|
66
|
+
<img
|
|
67
|
+
src={thumbImage}
|
|
68
|
+
alt="Notification Thumb"
|
|
69
|
+
className="w-full h-full w-[100px] h-[100px] object-cover"
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
)}
|
|
73
|
+
{customThumbComponent && customThumbComponent}
|
|
74
|
+
</div>
|
|
75
|
+
<div className="flex flex-col justify-center items-start relative w-full">
|
|
76
|
+
<div className="text-left ml-3 flex flex-col items-start justify-start w-full">
|
|
77
|
+
<h4
|
|
78
|
+
onClick={handleCardClick}
|
|
79
|
+
className="cursor-pointer font-bold tracking-wide line-clamp-2 text-black text-[14px] pr-[20px] notification-card-title"
|
|
80
|
+
data-testid="notification-title"
|
|
81
|
+
>
|
|
82
|
+
{title}
|
|
83
|
+
</h4>
|
|
84
|
+
<p
|
|
85
|
+
className={`font-semibold p-0 mt-[10px] leading-none tracking-wide line-clamp-1 text-[12px] notification-card-type-text ${textStyles}`}
|
|
86
|
+
data-testid="notification-type"
|
|
87
|
+
>
|
|
88
|
+
{typeText}{' '}
|
|
89
|
+
{issueDate && (
|
|
90
|
+
<span
|
|
91
|
+
className="text-grayscale-600 normal-case font-normal text-[12px] notification-card-type-issue-date"
|
|
92
|
+
data-testid="notification-cred-issue-date"
|
|
93
|
+
>
|
|
94
|
+
• {issueDate}
|
|
95
|
+
</span>
|
|
96
|
+
)}
|
|
97
|
+
</p>
|
|
98
|
+
|
|
99
|
+
{showIssuerInfo && (
|
|
100
|
+
<div className="notification-card-issuer-info flex items-center mt-[10px]">
|
|
101
|
+
<div className="profile-thumb-img border-[2px] border-white border-solid vc-issuee-image h-[35px] w-[35px] rounded-full overflow-hidden mx-[-5px]">
|
|
102
|
+
<UserProfilePicture
|
|
103
|
+
customContainerClass={`h-full w-full object-cover text-xl ${
|
|
104
|
+
!issuerInfo?.image ? 'pt-[3px]' : ''
|
|
105
|
+
}`}
|
|
106
|
+
user={{ image: issuerInfo?.image, name: issuerInfo?.fullName }}
|
|
107
|
+
alt="profile"
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
110
|
+
<div className="notification-issuer-info-text flex items-center px-[10px]">
|
|
111
|
+
<p className="text-[13px] text-gray-700 font-medium">
|
|
112
|
+
From {issuerInfo?.fullName || issuerInfo?.displayName}
|
|
113
|
+
</p>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
)}
|
|
117
|
+
|
|
118
|
+
<div className="flex items-center justify-between mt-3 w-full">
|
|
119
|
+
<button
|
|
120
|
+
className={`notification-claim-btn flex items-center mr-[15px] w-[143px] justify-center flex-1 rounded-[24px] border-2 border-solid font-semibold py-2 px-3 tracking-wide ${claimButtonStyles}`}
|
|
121
|
+
onClick={handleButtonClick}
|
|
122
|
+
role="button"
|
|
123
|
+
name="notification-claim-button"
|
|
124
|
+
>
|
|
125
|
+
{isClaimed && <Checkmark className="h-[24px] p-0 m-0" />}{' '}
|
|
126
|
+
{isLoading ? 'Loading...' : buttonText}
|
|
127
|
+
</button>
|
|
128
|
+
|
|
129
|
+
<button
|
|
130
|
+
onClick={handleCancelClick}
|
|
131
|
+
className={`rounded-[24px] flex items-center justify-center h-[42px] w-[42px] shadow-bottom bg-white font-semibold mr-2 p-[0px] tracking-wide ${viewButtonStyles}`}
|
|
132
|
+
role="button"
|
|
133
|
+
name="notification-view-button"
|
|
134
|
+
>
|
|
135
|
+
{!isArchived && (
|
|
136
|
+
<img src={X ?? ''} alt="Cancel" className="notification-card-x" />
|
|
137
|
+
)}
|
|
138
|
+
{isArchived && (
|
|
139
|
+
<img
|
|
140
|
+
src={ArrowArcLeft ?? ''}
|
|
141
|
+
alt="Cancel"
|
|
142
|
+
className="notification-card-x"
|
|
143
|
+
/>
|
|
144
|
+
)}
|
|
145
|
+
</button>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export default NotificationBoostCard;
|