Skip to content

Commit

Permalink
Merge pull request #2517 from anuradha9712/feat-avatar-group-figma-co…
Browse files Browse the repository at this point in the history
…nnect

feat(avatarGroup): add figma code connect
  • Loading branch information
samyak3009 authored Jan 28, 2025
2 parents ef3d403 + 5af38b7 commit 6d4b6af
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 5 deletions.
54 changes: 54 additions & 0 deletions figma/AvatarGroup.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React from 'react';
import { Avatar, AvatarGroup } from '@/index';
import figma from '@figma/code-connect';

figma.connect(AvatarGroup, 'https://www.figma.com/design/w8sqBtJpvq86D06UE7gN0T/MDS---Web?node-id=37-593', {
imports: ["import { AvatarGroup } from '@innovaccer/design-system'"],
props: {
size: figma.enum('Size', {
Regular: 'regular',
Small: 'tiny',
}),
max: figma.enum('Count', {
'Less than three': 3,
'More than three': 2,
}),
list: figma.enum('Type', {
Initial: [
{
firstName: 'John',
lastName: 'Doe',
},
{
firstName: 'Jane',
lastName: 'Doe',
},
],
Icon: [
{
firstName: 'Rachel',
lastName: 'Green',
icon: <Avatar.Icon name="person" />,
},
{
firstName: 'John',
lastName: 'Doe',
icon: <Avatar.Icon name="person" />,
},
],
Image: [
{
firstName: 'John',
lastName: 'Doe',
image: <Avatar.Image src="url" />,
},
{
firstName: 'Rachel',
lastName: 'Green',
image: <Avatar.Image src="url" />,
},
],
}),
},
example: (props) => <AvatarGroup {...props} />,
});
10 changes: 5 additions & 5 deletions figma/Tooltip.figma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ figma.connect(Tooltip, 'https://www.figma.com/design/w8sqBtJpvq86D06UE7gN0T/MDS-
imports: ["import { Tooltip } from '@innovaccer/design-system'"],
props: {
position: figma.enum('Position', {
'Bottom': 'bottom',
'Top': 'top',
'Right': 'right',
'Left': 'left'
})
Bottom: 'bottom',
Top: 'top',
Right: 'right',
Left: 'left',
}),
},
example: (props) => <Tooltip tooltip="Tooltip" {...props} />,
});

0 comments on commit 6d4b6af

Please sign in to comment.