1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

added deprecation message above SiteIcon (#19256)

* added deprecation message above SiteIcon

* fix eslint

* Some small updates to show correct code formatting and removing params

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
This commit is contained in:
Binij Shrestha 2023-06-01 22:17:10 +05:45 committed by GitHub
parent c146023598
commit 33cd2c7c18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,14 @@ import PropTypes from 'prop-types';
import IconBorder from '../icon-border';
import IconWithFallback from '../icon-with-fallback';
/**
* @deprecated `<SiteIcon />` has been deprecated in favor of the new `<AvatarFavicon>` component from the component-library.
* Please update your code to use the new <AvatarFavicon> component instead, which can be found at ./ui/components/component-library/avatar-favicon.js.
* You can find documentation for the new AvatarFavicon component in the MetaMask Storybook:
* {@link https://metamask.github.io/metamask-storybook/?path=/story/components-componentlibrary-avatarfavicon--default-story}
* Help to replace `SiteIcon` with `AvatarFavicon` by submitting a PR
*/
export default function SiteIcon({ icon = null, name = '', size, className }) {
const iconSize = Math.floor(size * 0.75);
return (