-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into task-popicons
- Loading branch information
Showing
20 changed files
with
498 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { View } from "react-native"; | ||
import { SvgProps } from "react-native-svg"; | ||
import { | ||
Card, | ||
CardContent, | ||
CardDescription, | ||
CardTitle, | ||
} from "~/components/ui/card"; | ||
import { cn } from "~/lib/utils"; | ||
|
||
type Props = { | ||
type: "error" | "warn" | "info"; | ||
icon: React.FunctionComponent<SvgProps>; | ||
title: string; | ||
description: string; | ||
className?: string; | ||
}; | ||
|
||
function Alert({ title, description, type, icon: Icon, className }: Props) { | ||
const textColor = | ||
type === "error" | ||
? "text-red-700 dark:text-red-300" | ||
: type === "warn" | ||
? "text-orange-700 dark:text-orange-300" | ||
: "text-blue-700 dark:text-blue-300"; | ||
return ( | ||
<Card | ||
className={cn( | ||
"w-full mb-4", | ||
type === "error" && | ||
"bg-red-50 dark:bg-red-900 border-red-100 dark:border-red-900", | ||
type === "warn" && | ||
"bg-orange-50 dark:bg-orange-900 border-orange-100 dark:border-orange-900", | ||
type === "info" && | ||
"bg-blue-50 dark:bg-blue-900 border-blue-100 dark:border-blue-900", | ||
className, | ||
)} | ||
> | ||
<CardContent className="flex flex-row items-center gap-4"> | ||
<Icon className={textColor} /> | ||
<View className="flex flex-1 flex-col"> | ||
<CardTitle className={textColor}>{title}</CardTitle> | ||
<CardDescription className={textColor}>{description}</CardDescription> | ||
</View> | ||
</CardContent> | ||
</Card> | ||
); | ||
} | ||
|
||
export default Alert; |
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,35 @@ | ||
import React from "react"; | ||
import { useColorScheme } from "react-native"; | ||
import Svg, { Path, Rect, SvgProps } from "react-native-svg"; | ||
|
||
const FailedTransactionIcon = (props: SvgProps) => { | ||
const colorScheme = useColorScheme(); | ||
|
||
const colors = { | ||
light: { | ||
rectFill: "#FEE2E2", | ||
pathStroke: "#FB7185", | ||
}, | ||
dark: { | ||
rectFill: "#450A0A", | ||
pathStroke: "#DC2626", | ||
}, | ||
}; | ||
|
||
const currentColors = colorScheme === "dark" ? colors.dark : colors.light; | ||
|
||
return ( | ||
<Svg width={40} height={40} viewBox="0 0 40 40" fill="none" {...props}> | ||
<Rect width="40" height="40" rx="20" fill={currentColors.rectFill} /> | ||
<Path | ||
strokeWidth="3.75" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
stroke={currentColors.pathStroke} | ||
d="M14.001 26.0002L26 14.0002M25.999 26L14 14.0002" | ||
/> | ||
</Svg> | ||
); | ||
}; | ||
|
||
export default FailedTransactionIcon; |
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,35 @@ | ||
import React from "react"; | ||
import { useColorScheme } from "react-native"; | ||
import Svg, { Path, Rect, SvgProps } from "react-native-svg"; | ||
|
||
const ReceivedTransactionIcon = (props: SvgProps) => { | ||
const colorScheme = useColorScheme(); | ||
|
||
const colors = { | ||
light: { | ||
rectFill: "#DBFBE6", | ||
pathStroke: "#22C45E", | ||
}, | ||
dark: { | ||
rectFill: "#022C22", | ||
pathStroke: "#10B981", | ||
}, | ||
}; | ||
|
||
const currentColors = colorScheme === "dark" ? colors.dark : colors.light; | ||
|
||
return ( | ||
<Svg width={40} height={40} viewBox="0 0 40 40" fill="none" {...props}> | ||
<Rect width="40" height="40" rx="20" fill={currentColors.rectFill} /> | ||
<Path | ||
strokeWidth="3.75" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
stroke={currentColors.pathStroke} | ||
d="M25 21.8745L20.5893 26.2852C20.2638 26.6107 19.7362 26.6107 19.4108 26.2852L15 21.8745M20 25.8328L20 13.3328" | ||
/> | ||
</Svg> | ||
); | ||
}; | ||
|
||
export default ReceivedTransactionIcon; |
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,35 @@ | ||
import React from "react"; | ||
import { useColorScheme } from "react-native"; | ||
import Svg, { Path, Rect, SvgProps } from "react-native-svg"; | ||
|
||
const SentTransactionIcon = (props: SvgProps) => { | ||
const colorScheme = useColorScheme(); | ||
|
||
const colors = { | ||
light: { | ||
rectFill: "#FEECD4", | ||
pathStroke: "#FA913C", | ||
}, | ||
dark: { | ||
rectFill: "#431407", | ||
pathStroke: "#D97706", | ||
}, | ||
}; | ||
|
||
const currentColors = colorScheme === "dark" ? colors.dark : colors.light; | ||
|
||
return ( | ||
<Svg width={40} height={40} viewBox="0 0 40 40" fill="none" {...props}> | ||
<Rect width="40" height="40" rx="20" fill={currentColors.rectFill} /> | ||
<Path | ||
strokeWidth="3.75" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
stroke={currentColors.pathStroke} | ||
d="M15 18.125L19.4107 13.7143C19.7362 13.3889 20.2638 13.3889 20.5892 13.7143L25 18.125M20 14.1667V26.6667" | ||
/> | ||
</Svg> | ||
); | ||
}; | ||
|
||
export default SentTransactionIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.