Skip to content

Commit

Permalink
examples fix
Browse files Browse the repository at this point in the history
  • Loading branch information
se7en-illa committed Oct 2, 2024
1 parent 33d9310 commit 127c0bc
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/examples/avatar/nameExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function Example() {
mwebExperimentName: 'web_gestalt_visualRefresh',
});

const name = isInVRExperiment ? 'Tamia Rashad' : 'Shanice Byles';
const name = isInVRExperiment ? 'Ayesha Rashad' : 'Shanice Byles';
const src = isInVRExperiment
? 'https://i.pinimg.com/originals/c5/5c/ac/c55caca43a7c16766215ec165b649c1c.jpg'
: 'https://i.ibb.co/7tGKGvb/shanice.jpg';
Expand Down
60 changes: 43 additions & 17 deletions docs/examples/avatarGroup/roleLink.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,54 @@
import { AvatarGroup, Box, Flex, Link, Text } from 'gestalt';
import { AvatarGroup, Box, Flex, Link, Text, useDangerouslyInGestaltExperiment } from 'gestalt';

export default function Example() {
const isInVRExperiment = useDangerouslyInGestaltExperiment({
webExperimentName: 'web_gestalt_visualRefresh',
mwebExperimentName: 'web_gestalt_visualRefresh',
});

const collaborators = [
{
name: 'Keerthi',
src: 'https://i.ibb.co/ZfCZrY8/keerthi.jpg',
},
{
name: 'Alberto',
src: 'https://i.ibb.co/NsK2w5y/Alberto.jpg',
},
{
name: 'Shanice',
src: 'https://i.ibb.co/7tGKGvb/shanice.jpg',
},
];

const collaboratorsVR = [
{
name: 'Fatima',
src: 'https://i.pinimg.com/originals/bf/bc/27/bfbc27685d81eb9a8f65c201ea661f0e.jpg',
},
{
name: 'Sora',
src: 'https://i.pinimg.com/originals/ab/c5/4a/abc54abd85df131e90ca6b372368b738.jpg',
},
{
name: 'Ayesha',
src: 'https://i.pinimg.com/originals/c5/5c/ac/c55caca43a7c16766215ec165b649c1c.jpg',
},
];

return (
<Flex alignItems="center" height="100%" justifyContent="center" width="100%">
<Box height={100} padding={2} width={600}>
<Flex alignItems="center" height="100%">
<Box column={5} height="100%">
<AvatarGroup
accessibilityLabel="Collaborators: Keerthi, Alberto, and Shanice."
collaborators={[
{
name: 'Keerthi',
src: 'https://i.ibb.co/ZfCZrY8/keerthi.jpg',
},
{
name: 'Alberto',
src: 'https://i.ibb.co/NsK2w5y/Alberto.jpg',
},
{
name: 'Shanice',
src: 'https://i.ibb.co/7tGKGvb/shanice.jpg',
},
]}
size="fit"
accessibilityLabel={
isInVRExperiment
? 'Collaborators: Fatima, Sora, and Ayesha.'
: 'Collaborators: Keerthi, Alberto, and Shanice.'
}
collaborators={isInVRExperiment ? collaboratorsVR : collaborators}
size={isInVRExperiment ? 'md' : 'fit'}
/>
</Box>
<Box column={7} marginStart={2}>
Expand Down

0 comments on commit 127c0bc

Please sign in to comment.