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 = {
|
type ValidatorListItemProps = {
|
||||||
name: string;
|
name: string;
|
||||||
avatarKey: string;
|
avatarKey: string;
|
||||||
|
isAvatarChipIncluded?: boolean;
|
||||||
|
isVerified?: boolean;
|
||||||
selected?: boolean;
|
selected?: boolean;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const ValidatorListItem = ({ name, avatarKey, selected }: ValidatorListItemProps) => {
|
const ValidatorListItem = ({ name, avatarKey, selected, isAvatarChipIncluded, isVerified }: ValidatorListItemProps) => {
|
||||||
const [hovered, setHovered] = useState(false);
|
const [hovered, setHovered] = useState(false);
|
||||||
const [isSelected, setIsSelected] = useState(selected);
|
const [isSelected, setIsSelected] = useState(selected);
|
||||||
|
|
||||||
|
@ -51,7 +54,12 @@ const ValidatorListItem = ({ name, avatarKey, selected }: ValidatorListItemProps
|
||||||
<YStack pl="8px">
|
<YStack pl="8px">
|
||||||
<Text size={13} weight={'semibold'}>
|
<Text size={13} weight={'semibold'}>
|
||||||
{name}
|
{name}
|
||||||
<VerifiedIcon size={20} /> <ContactIcon size={20} />
|
{isVerified && (
|
||||||
|
<VerifiedIcon size={20} />
|
||||||
|
)}
|
||||||
|
{isAvatarChipIncluded && (
|
||||||
|
<ContactIcon size={20} />
|
||||||
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text size={13}>{avatarKey}</Text>
|
<Text size={13}>{avatarKey}</Text>
|
||||||
</YStack>
|
</YStack>
|
||||||
|
|
Loading…
Reference in New Issue