-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(molecules): add figma code connect for molecules component
- Loading branch information
1 parent
49a40eb
commit de8c4b4
Showing
18 changed files
with
266 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
import { Dropzone } from '@/index'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect(Dropzone, 'https://www.figma.com/design/w8sqBtJpvq86D06UE7gN0T/MDS---Web?node-id=1085-2320', { | ||
imports: ["import { Dropzone } from '@innovaccer/design-system'"], | ||
props: { | ||
type: figma.enum('Size', { | ||
Standard: 'standard', | ||
Compressed: 'compressed', | ||
Tight: 'tight', | ||
}), | ||
disabled: figma.enum('State', { | ||
Disabled: true, | ||
}), | ||
}, | ||
example: (props) => ( | ||
<Dropzone {...props} accept="application/pdf" formatLabel="Accepted formats: PDF" sizeLabel="Maximum size: 25 MB" /> | ||
), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { EditableChipInput } from '@/index'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect(EditableChipInput, 'https://www.figma.com/design/w8sqBtJpvq86D06UE7gN0T/MDS---Web?node-id=800-2233', { | ||
imports: ["import { EditableChipInput } from '@innovaccer/design-system'"], | ||
variant: { Type: 'Input with Chips' }, | ||
props: {}, | ||
example: (props) => ( | ||
<EditableChipInput {...props} value={['Chip 1', 'Chip 2', 'Chip 3']} placeholder="Placeholder" /> | ||
), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { EditableDropdown } from '@/index'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect(EditableDropdown, 'https://www.figma.com/design/w8sqBtJpvq86D06UE7gN0T/MDS---Web?node-id=800-2233', { | ||
imports: ["import { EditableDropdown } from '@innovaccer/design-system'"], | ||
variant: { Type: 'Dropdown' }, | ||
example: (props) => ( | ||
<EditableDropdown | ||
{...props} | ||
placeholder="Select Option" | ||
dropdownOptions={{ | ||
options: [ | ||
{ label: 'Edit', value: 'edit' }, | ||
{ label: 'Export', value: 'export' }, | ||
{ label: 'Delete', value: 'delete' }, | ||
], | ||
}} | ||
/> | ||
), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import { EditableInput } from '@/index'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect(EditableInput, 'https://www.figma.com/design/w8sqBtJpvq86D06UE7gN0T/MDS---Web?node-id=800-2233', { | ||
imports: ["import { EditableInput } from '@innovaccer/design-system'"], | ||
variant: { Type: 'Regular Text Input' }, | ||
props: { | ||
error: figma.enum('State', { | ||
'Error - Focus': true, | ||
}), | ||
errorMessage: figma.enum('State', { | ||
'Error - Focus': 'Short error description goes here', | ||
}), | ||
}, | ||
example: (props) => <EditableInput {...props} value="Value" placeholder="Placeholder" size="regular" />, | ||
}); | ||
|
||
figma.connect(EditableInput, 'https://www.figma.com/design/w8sqBtJpvq86D06UE7gN0T/MDS---Web?node-id=800-2233', { | ||
imports: ["import { EditableInput } from '@innovaccer/design-system'"], | ||
variant: { Type: 'Small Text Input' }, | ||
props: { | ||
error: figma.enum('State', { | ||
'Error - Focus': true, | ||
}), | ||
errorMessage: figma.enum('State', { | ||
'Error - Focus': 'Short error description goes here', | ||
}), | ||
}, | ||
example: (props) => <EditableInput {...props} value="Value" placeholder="Placeholder" size="tiny" />, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import { EmptyState, Button } from '@/index'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect(EmptyState, 'https://www.figma.com/design/w8sqBtJpvq86D06UE7gN0T/MDS---Web?node-id=46322-5927', { | ||
imports: ["import { EmptyState } from '@innovaccer/design-system'"], | ||
props: { | ||
size: figma.enum('Size', { | ||
Standard: 'standard', | ||
Compressed: 'compressed', | ||
Tight: 'tight', | ||
}), | ||
description: figma.enum('Description', { | ||
true: <EmptyState.Description>Description goes here</EmptyState.Description>, | ||
}), | ||
primaryAction: figma.enum('Primary Action', { | ||
true: <Button appearance="primary">Primary action</Button>, | ||
false: undefined, | ||
}), | ||
secondaryAction: figma.enum('Secondary Action', { | ||
true: <Button className="mr-4">Secondary action</Button>, | ||
false: undefined, | ||
}), | ||
illustration: figma.enum('Illustration', { | ||
true: <EmptyState.Image src="" />, | ||
}), | ||
}, | ||
example: ({ illustration, description, primaryAction, secondaryAction, ...rest }) => ( | ||
<EmptyState {...rest}> | ||
{illustration} | ||
<EmptyState.Title>Title goes here</EmptyState.Title> | ||
{description} | ||
<EmptyState.Actions> | ||
{secondaryAction} | ||
{primaryAction} | ||
</EmptyState.Actions> | ||
</EmptyState> | ||
), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import { FileList } from '@/index'; | ||
import figma from '@figma/code-connect'; | ||
|
||
figma.connect(FileList, 'https://www.figma.com/design/w8sqBtJpvq86D06UE7gN0T/MDS---Web?node-id=952-121', { | ||
imports: ["import { FileList } from '@innovaccer/design-system'"], | ||
props: { | ||
fileType: figma.enum('File type', { | ||
Audio: 'audio', | ||
Video: 'video', | ||
Image: 'image', | ||
Document: 'application', | ||
}), | ||
fileStatus: figma.enum('Status', { | ||
Uploading: 'uploading', | ||
Error: 'error', | ||
Uploaded: 'completed', | ||
}), | ||
}, | ||
example: ({ fileType, fileStatus, ...rest }) => ( | ||
<FileList | ||
{...rest} | ||
fileList={[ | ||
{ | ||
file: { | ||
type: fileType, | ||
name: 'file name', | ||
size: '2 MB', | ||
}, | ||
status: fileStatus, | ||
progress: 100, | ||
id: 1, | ||
}, | ||
]} | ||
/> | ||
), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.