-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use react components for error & success icons
- Loading branch information
1 parent
0cafcbf
commit 85dbf70
Showing
13 changed files
with
113 additions
and
52 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ComponentProps } from 'react'; | ||
|
||
export const CheckCircleIcon = (props: ComponentProps<'svg'>) => { | ||
return ( | ||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" {...props}> | ||
<circle cx="6.99992" cy="7.00065" r="6.16667" stroke="currentColor" /> | ||
<path | ||
d="M10.3428 4.73047L5.8053 9.26797L4 7.46267" | ||
stroke="currentColor" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</svg> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { ComponentProps } from 'react'; | ||
|
||
export const ErrorCircleFillIcon = (props: ComponentProps<'svg'>) => { | ||
// Need to have unique id if we are using it multiple times | ||
// https://stackoverflow.com/questions/70985078/when-i-display-none-one-svg-another-independent-svg-gets-rendered-differen | ||
const random = Math.random(); | ||
const maskId = `path-1-inside-1_${random}`; | ||
return ( | ||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" {...props}> | ||
<mask id={maskId} fill="white"> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M7.00065 13.6654C10.6825 13.6654 13.6673 10.6806 13.6673 6.9987C13.6673 3.3168 10.6825 0.332031 7.00065 0.332031C3.31875 0.332031 0.333984 3.3168 0.333984 6.9987C0.333984 10.6806 3.31875 13.6654 7.00065 13.6654ZM5.15045 4.08881C4.85755 3.79592 4.38268 3.79592 4.08979 4.08881C3.79689 4.3817 3.79689 4.85658 4.08979 5.14947L5.93946 6.99914L4.08979 8.84881C3.79689 9.1417 3.79689 9.61658 4.08979 9.90947C4.38268 10.2024 4.85755 10.2024 5.15045 9.90947L7.00012 8.0598L8.84979 9.90947C9.14268 10.2024 9.61755 10.2024 9.91045 9.90947C10.2033 9.61658 10.2033 9.1417 9.91045 8.84881L8.06078 6.99914L9.91045 5.14947C10.2033 4.85658 10.2033 4.3817 9.91045 4.08881C9.61755 3.79592 9.14268 3.79592 8.84979 4.08881L7.00012 5.93848L5.15045 4.08881Z" | ||
/> | ||
</mask> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M7.00065 13.6654C10.6825 13.6654 13.6673 10.6806 13.6673 6.9987C13.6673 3.3168 10.6825 0.332031 7.00065 0.332031C3.31875 0.332031 0.333984 3.3168 0.333984 6.9987C0.333984 10.6806 3.31875 13.6654 7.00065 13.6654ZM5.15045 4.08881C4.85755 3.79592 4.38268 3.79592 4.08979 4.08881C3.79689 4.3817 3.79689 4.85658 4.08979 5.14947L5.93946 6.99914L4.08979 8.84881C3.79689 9.1417 3.79689 9.61658 4.08979 9.90947C4.38268 10.2024 4.85755 10.2024 5.15045 9.90947L7.00012 8.0598L8.84979 9.90947C9.14268 10.2024 9.61755 10.2024 9.91045 9.90947C10.2033 9.61658 10.2033 9.1417 9.91045 8.84881L8.06078 6.99914L9.91045 5.14947C10.2033 4.85658 10.2033 4.3817 9.91045 4.08881C9.61755 3.79592 9.14268 3.79592 8.84979 4.08881L7.00012 5.93848L5.15045 4.08881Z" | ||
fill="currentColor" | ||
/> | ||
<path | ||
d="M4.08979 4.08881L3.61838 3.61741L3.61838 3.61741L4.08979 4.08881ZM5.15045 4.08881L5.62185 3.61741V3.61741L5.15045 4.08881ZM4.08979 5.14947L3.61838 5.62088H3.61838L4.08979 5.14947ZM5.93946 6.99914L6.41086 7.47055L6.88227 6.99914L6.41086 6.52774L5.93946 6.99914ZM4.08979 8.84881L3.61838 8.37741L3.61838 8.37741L4.08979 8.84881ZM4.08979 9.90947L3.61838 10.3809L3.61838 10.3809L4.08979 9.90947ZM5.15045 9.90947L5.62185 10.3809L5.62185 10.3809L5.15045 9.90947ZM7.00012 8.0598L7.47152 7.5884L7.00012 7.11699L6.52871 7.5884L7.00012 8.0598ZM8.84979 9.90947L8.37838 10.3809L8.37838 10.3809L8.84979 9.90947ZM9.91045 9.90947L10.3819 10.3809L10.3819 10.3809L9.91045 9.90947ZM9.91045 8.84881L10.3819 8.37741L10.3819 8.37741L9.91045 8.84881ZM8.06078 6.99914L7.58937 6.52774L7.11797 6.99914L7.58937 7.47055L8.06078 6.99914ZM9.91045 4.08881L10.3819 3.61741V3.61741L9.91045 4.08881ZM8.84979 4.08881L8.37838 3.61741L8.37838 3.61741L8.84979 4.08881ZM7.00012 5.93848L6.52871 6.40988L7.00012 6.88129L7.47152 6.40988L7.00012 5.93848ZM13.0007 6.9987C13.0007 10.3124 10.3144 12.9987 7.00065 12.9987V14.332C11.0507 14.332 14.334 11.0488 14.334 6.9987H13.0007ZM7.00065 0.998698C10.3144 0.998698 13.0007 3.68499 13.0007 6.9987H14.334C14.334 2.94861 11.0507 -0.334635 7.00065 -0.334635V0.998698ZM1.00065 6.9987C1.00065 3.68499 3.68694 0.998698 7.00065 0.998698V-0.334635C2.95056 -0.334635 -0.332682 2.94861 -0.332682 6.9987H1.00065ZM7.00065 12.9987C3.68694 12.9987 1.00065 10.3124 1.00065 6.9987H-0.332682C-0.332682 11.0488 2.95056 14.332 7.00065 14.332V12.9987ZM4.56119 4.56021C4.59374 4.52767 4.6465 4.52767 4.67904 4.56021L5.62185 3.61741C5.06861 3.06416 4.17163 3.06416 3.61838 3.61741L4.56119 4.56021ZM4.56119 4.67807C4.52865 4.64552 4.52865 4.59276 4.56119 4.56021L3.61838 3.61741C3.06514 4.17065 3.06514 5.06763 3.61838 5.62088L4.56119 4.67807ZM6.41086 6.52774L4.56119 4.67807L3.61838 5.62088L5.46805 7.47055L6.41086 6.52774ZM4.56119 9.32022L6.41086 7.47055L5.46805 6.52774L3.61838 8.37741L4.56119 9.32022ZM4.56119 9.43807C4.52865 9.40552 4.52865 9.35276 4.56119 9.32021L3.61838 8.37741C3.06514 8.93065 3.06514 9.82763 3.61838 10.3809L4.56119 9.43807ZM4.67904 9.43807C4.6465 9.47061 4.59373 9.47061 4.56119 9.43807L3.61838 10.3809C4.17163 10.9341 5.06861 10.9341 5.62185 10.3809L4.67904 9.43807ZM6.52871 7.5884L4.67904 9.43807L5.62185 10.3809L7.47152 8.53121L6.52871 7.5884ZM9.32119 9.43807L7.47152 7.5884L6.52871 8.53121L8.37838 10.3809L9.32119 9.43807ZM9.43904 9.43807C9.4065 9.47061 9.35373 9.47061 9.32119 9.43807L8.37838 10.3809C8.93163 10.9341 9.82861 10.9341 10.3819 10.3809L9.43904 9.43807ZM9.43904 9.32021C9.47159 9.35276 9.47159 9.40552 9.43904 9.43807L10.3819 10.3809C10.9351 9.82763 10.9351 8.93065 10.3819 8.37741L9.43904 9.32021ZM7.58937 7.47055L9.43904 9.32022L10.3819 8.37741L8.53218 6.52774L7.58937 7.47055ZM9.43904 4.67807L7.58937 6.52774L8.53218 7.47055L10.3819 5.62088L9.43904 4.67807ZM9.43904 4.56021C9.47159 4.59276 9.47159 4.64552 9.43904 4.67807L10.3819 5.62088C10.9351 5.06763 10.9351 4.17065 10.3819 3.61741L9.43904 4.56021ZM9.32119 4.56021C9.35373 4.52767 9.4065 4.52767 9.43904 4.56021L10.3819 3.61741C9.82861 3.06416 8.93163 3.06416 8.37838 3.61741L9.32119 4.56021ZM7.47152 6.40988L9.32119 4.56021L8.37838 3.61741L6.52871 5.46708L7.47152 6.40988ZM4.67904 4.56021L6.52871 6.40988L7.47152 5.46708L5.62185 3.61741L4.67904 4.56021Z" | ||
fill="currentColor" | ||
mask={`url(#${maskId})`} | ||
/> | ||
</svg> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ComponentProps } from 'react'; | ||
|
||
export const ErrorCircleIcon = (props: ComponentProps<'svg'>) => { | ||
return ( | ||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" {...props}> | ||
<circle cx="6.99992" cy="7.00065" r="6.16667" stroke="#99A0E4" /> | ||
<path | ||
d="M5 5.00098L9 9.00098M9 5.00098L5 9.00098" | ||
stroke="currentColor" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</svg> | ||
); | ||
}; |
Oops, something went wrong.