diff --git a/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/AvatarFavicon.tsx b/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/AvatarFavicon.tsx
index 4078026d14d..803a4405507 100644
--- a/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/AvatarFavicon.tsx
+++ b/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/AvatarFavicon.tsx
@@ -20,6 +20,7 @@ import {
} from './AvatarFavicon.constants';
import stylesheet from './AvatarFavicon.styles';
import { AvatarFaviconProps } from './AvatarFavicon.types';
+import { AvatarSize } from '../../Avatar.types';
const AvatarFavicon = ({
imageSource,
@@ -50,7 +51,7 @@ const AvatarFavicon = ({
// requires that the domain is passed in as a prop from the parent
const renderFallbackFavicon = () => (
);
@@ -104,8 +105,12 @@ const AvatarFavicon = ({
const renderFavicon = () => (svgSource ? renderSvg() : renderImage());
return (
-
- {error || !isValidSource ? renderFallbackFavicon() : renderFavicon()}
+
+ {error ? renderFallbackFavicon() : renderFavicon()}
);
};
diff --git a/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/AvatarFavicon.types.ts b/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/AvatarFavicon.types.ts
index bf1cce22dd8..1a5e4f0295a 100644
--- a/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/AvatarFavicon.types.ts
+++ b/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/AvatarFavicon.types.ts
@@ -1,7 +1,5 @@
// Third party dependencies.
-import { ImageSourcePropType } from 'react-native';
-
-// External dependencies.
+import { ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
import { AvatarBaseProps } from '../../foundation/AvatarBase';
/**
@@ -11,7 +9,20 @@ export interface AvatarFaviconProps extends AvatarBaseProps {
/**
* A favicon image from either a local or remote source.
*/
- imageSource: ImageSourcePropType;
+ imageSource?: ImageSourcePropType;
+ /**
+ * Optional boolean to includes border or not.
+ * @default false
+ */
+ includesBorder?: boolean;
+ /**
+ * The name of the avatar.
+ */
+ style?: StyleProp;
+ /**
+ * The name of the avatar.
+ */
+ name?: string;
}
/**
diff --git a/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/__snapshots__/AvatarFavicon.test.tsx.snap b/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/__snapshots__/AvatarFavicon.test.tsx.snap
index 4adafb779d8..fa97b443e62 100644
--- a/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/__snapshots__/AvatarFavicon.test.tsx.snap
+++ b/app/component-library/components/Avatars/Avatar/variants/AvatarFavicon/__snapshots__/AvatarFavicon.test.tsx.snap
@@ -2,7 +2,7 @@
exports[`AvatarFavicon should match the snapshot 1`] = `
{
const { variant, ...restProps } = buttonProps;
- switch (variant) {
+ // Capitalize first letter of variant. Snaps sends the variant in lowercase.
+ const capitalizedVariant = variant.charAt(0).toUpperCase() + variant.slice(1);
+
+ switch (capitalizedVariant) {
case ButtonVariants.Link:
return ;
case ButtonVariants.Primary:
diff --git a/app/component-library/components/Buttons/Button/foundation/ButtonBase/ButtonBase.types.ts b/app/component-library/components/Buttons/Button/foundation/ButtonBase/ButtonBase.types.ts
index 6b0fb32ca7e..9d212412015 100644
--- a/app/component-library/components/Buttons/Button/foundation/ButtonBase/ButtonBase.types.ts
+++ b/app/component-library/components/Buttons/Button/foundation/ButtonBase/ButtonBase.types.ts
@@ -1,10 +1,16 @@
// Third party dependencies.
-import { ColorValue, TouchableOpacityProps } from 'react-native';
+import {
+ ColorValue,
+ StyleProp,
+ TextStyle,
+ TouchableOpacityProps,
+} from 'react-native';
// External dependencies.
import { IconProps } from '../../../../Icons/Icon';
import { ButtonSize, ButtonWidthTypes } from '../../Button.types';
import { TextVariant } from '../../../../Texts/Text';
+import { ButtonType } from '@metamask/snaps-sdk';
/**
* ButtonBase component props.
@@ -13,7 +19,7 @@ export interface ButtonBaseProps extends TouchableOpacityProps {
/**
* Button text.
*/
- label: string | React.ReactNode;
+ label?: string | React.ReactNode;
/**
* Optional prop for the color of label. Applies to icon too.
*/
@@ -55,6 +61,14 @@ export interface ButtonBaseProps extends TouchableOpacityProps {
* An optional loading state of Button.
*/
loading?: boolean;
+ /**
+ * An optional type of Button.
+ */
+ type?: ButtonType;
+ /**
+ * An optional text props of Button.
+ */
+ textProps?: StyleProp;
}
/**
diff --git a/app/component-library/components/Buttons/Button/variants/ButtonPrimary/ButtonPrimary.tsx b/app/component-library/components/Buttons/Button/variants/ButtonPrimary/ButtonPrimary.tsx
index c402bd98bd8..c7073780cbf 100644
--- a/app/component-library/components/Buttons/Button/variants/ButtonPrimary/ButtonPrimary.tsx
+++ b/app/component-library/components/Buttons/Button/variants/ButtonPrimary/ButtonPrimary.tsx
@@ -23,6 +23,8 @@ const ButtonPrimary = ({
onPressOut,
isDanger = false,
label,
+ startIconName,
+ endIconName,
...props
}: ButtonPrimaryProps) => {
const [pressed, setPressed] = useState(false);
@@ -60,9 +62,9 @@ const ButtonPrimary = ({
label
);
- const renderLoading = () => (
-
- );
+ const renderLoading = () => (
+
+ );
return (