-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Christy Presler <[email protected]>
- Loading branch information
Showing
44 changed files
with
899 additions
and
85 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,51 @@ | ||
import { ChangeLog } from '../../types/ChangeLog'; | ||
import { Button } from '../Button'; | ||
import { COLOR, FONT } from '../../utilities/Styles'; | ||
import { ActionLinkIcon } from '../../svgs/ActionLinkIcon'; | ||
|
||
const { widget } = figma; | ||
const { AutoLayout, Text } = widget; | ||
|
||
interface AddLinkProps { | ||
changeLog: ChangeLog; | ||
updateChange: (changes: Partial<ChangeLog>) => void; | ||
} | ||
|
||
export const AddLink = ({ | ||
changeLog, | ||
updateChange, | ||
}: AddLinkProps) => { | ||
return ( | ||
<AutoLayout | ||
width="fill-parent" | ||
horizontalAlignItems="end" | ||
verticalAlignItems="center" | ||
> | ||
{changeLog.links && changeLog.links.length > 7 ? ( | ||
<Text | ||
fill={COLOR.greyDark} | ||
lineHeight={FONT.lineHeight.xs} | ||
fontFamily={FONT.family} | ||
fontSize={FONT.size.xs} | ||
letterSpacing={FONT.letterSpacing.sm} | ||
fontWeight={FONT.weight.regular} | ||
> | ||
Link maximum (8) reached. | ||
</Text> | ||
) : ( | ||
<Button | ||
label="Add Link" | ||
iconSrc={<ActionLinkIcon color={COLOR.greyDark} />} | ||
action={() => { | ||
updateChange({ | ||
state: { | ||
...changeLog.state, | ||
showLinkForm: true, | ||
} | ||
}) | ||
}} | ||
/> | ||
)} | ||
</AutoLayout> | ||
) | ||
} |
Oops, something went wrong.