Add icons logic in ValidatorListItem
This commit is contained in:
parent
a7b947afe5
commit
d900076202
|
@ -6,10 +6,13 @@ import { VerifiedIcon, ContactIcon } from '@status-im/icons';
|
|||
type ValidatorListItemProps = {
|
||||
name: string;
|
||||
avatarKey: string;
|
||||
isAvatarChipIncluded?: boolean;
|
||||
isVerified?: boolean;
|
||||
selected?: boolean;
|
||||
|
||||
};
|
||||
|
||||
const ValidatorListItem = ({ name, avatarKey, selected }: ValidatorListItemProps) => {
|
||||
const ValidatorListItem = ({ name, avatarKey, selected, isAvatarChipIncluded, isVerified }: ValidatorListItemProps) => {
|
||||
const [hovered, setHovered] = useState(false);
|
||||
const [isSelected, setIsSelected] = useState(selected);
|
||||
|
||||
|
@ -51,7 +54,12 @@ const ValidatorListItem = ({ name, avatarKey, selected }: ValidatorListItemProps
|
|||
<YStack pl="8px">
|
||||
<Text size={13} weight={'semibold'}>
|
||||
{name}
|
||||
<VerifiedIcon size={20} /> <ContactIcon size={20} />
|
||||
{isVerified && (
|
||||
<VerifiedIcon size={20} />
|
||||
)}
|
||||
{isAvatarChipIncluded && (
|
||||
<ContactIcon size={20} />
|
||||
)}
|
||||
</Text>
|
||||
<Text size={13}>{avatarKey}</Text>
|
||||
</YStack>
|
||||
|
|
Loading…
Reference in New Issue