-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates cards text and image for code connect
- Loading branch information
1 parent
1490205
commit 97a5139
Showing
10 changed files
with
202 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ | |
<style> | ||
#storybook-root { | ||
width: 100%; | ||
display: grid; | ||
place-items: center; | ||
} | ||
</style> | ||
|
||
|
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,69 @@ | ||
import { figma } from "@figma/code-connect"; | ||
import { | ||
BasicCard, | ||
PricingCard, | ||
ProductInfoCard, | ||
TestimonialCard, | ||
} from "./Cards"; | ||
|
||
const FIGMA_URL_BASIC_CARD = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=113-12732&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_PRODUCT_INFO_CARD = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=7753-4465&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_PRICING_CARD = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=7722-3736&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TESTIMONIAL_CARD = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=7717-3946&t=piSsjqZPlyn7qp8D-11"; | ||
|
||
figma.connect(BasicCard, FIGMA_URL_BASIC_CARD, { | ||
props: { | ||
media: figma.children(["Image", "Icon"]), | ||
heading: figma.children("Text Heading"), | ||
body: figma.children("Text"), | ||
actions: figma.children("Button Group"), | ||
variant: figma.enum("Variant", { | ||
Stroke: "stroke", | ||
}), | ||
}, | ||
example: ({ actions, variant, heading, body, media }) => ( | ||
<BasicCard variant={variant} media={media}> | ||
{heading} | ||
{body} | ||
{actions} | ||
</BasicCard> | ||
), | ||
}); | ||
figma.connect(ProductInfoCard, FIGMA_URL_PRODUCT_INFO_CARD, { | ||
props: { | ||
media: figma.children("Image"), | ||
children: figma.children([ | ||
"Text Heading", | ||
"Text Subheading", | ||
"Text Title Page", | ||
"Text", | ||
]), | ||
actions: figma.children("Button Group"), | ||
}, | ||
example: ({ actions, children, media }) => ( | ||
<ProductInfoCard media={media}> | ||
{children} | ||
{actions} | ||
</ProductInfoCard> | ||
), | ||
}); | ||
figma.connect(PricingCard, FIGMA_URL_PRICING_CARD, { | ||
props: { | ||
children: figma.children([ | ||
"Text Heading", | ||
"Text Title Page", | ||
"Text Small", | ||
"Text List", | ||
"Button Group", | ||
]), | ||
}, | ||
example: ({ children }) => <PricingCard>{children}</PricingCard>, | ||
}); | ||
figma.connect(TestimonialCard, FIGMA_URL_TESTIMONIAL_CARD, { | ||
props: { children: figma.children(["Text Heading", "Avatar Block"]) }, | ||
example: ({ children }) => <TestimonialCard>{children}</TestimonialCard>, | ||
}); |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,96 @@ | ||
import figma from "@figma/code-connect"; | ||
import { Text } from "./Text"; | ||
import { | ||
Text, | ||
TextCode, | ||
TextEmphasis, | ||
TextHeading, | ||
TextLink, | ||
TextList, | ||
TextListItem, | ||
TextSmall, | ||
TextStrong, | ||
TextSubheading, | ||
TextSubtitle, | ||
TextTitleHero, | ||
TextTitlePage, | ||
} from "./Text"; | ||
|
||
const FIGMA_URL_BODY_BASE = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2087-8487&m=dev"; | ||
const FIGMA_URL_TEXT_TITLE_HERO = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2087-8491&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT_TITLE_PAGE = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2087-8490&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT_SUBTITLE = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2103-22298&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT_HEADING = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2087-8488&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT_SUBHEADING = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2103-22303&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2087-8487&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT_EMPHASIS = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2087-8485&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT_LINK = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2087-8483&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT_STRONG = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2087-8486&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT_SMALL = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2087-8484&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT_CODE = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2104-22325&t=piSsjqZPlyn7qp8D-11"; | ||
const FIGMA_URL_TEXT_LIST = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2010-10204&m=dev"; | ||
const FIGMA_URL_TEXT_LIST_ITEM = | ||
"https://staging.figma.com/design/YfiqA0yWMXuLJAzkZNpBdy/SDS?node-id=2077-11663&m=dev"; | ||
|
||
figma.connect(Text, FIGMA_URL_BODY_BASE, { | ||
props: { | ||
text: figma.string("Text"), | ||
}, | ||
figma.connect(TextTitleHero, FIGMA_URL_TEXT_TITLE_HERO, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextTitleHero>{text}</TextTitleHero>, | ||
}); | ||
figma.connect(TextTitlePage, FIGMA_URL_TEXT_TITLE_PAGE, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextTitlePage>{text}</TextTitlePage>, | ||
}); | ||
figma.connect(TextSubtitle, FIGMA_URL_TEXT_SUBTITLE, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextSubtitle>{text}</TextSubtitle>, | ||
}); | ||
figma.connect(TextHeading, FIGMA_URL_TEXT_HEADING, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextHeading>{text}</TextHeading>, | ||
}); | ||
figma.connect(TextSubheading, FIGMA_URL_TEXT_SUBHEADING, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextSubheading>{text}</TextSubheading>, | ||
}); | ||
figma.connect(Text, FIGMA_URL_TEXT, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <Text>{text}</Text>, | ||
}); | ||
figma.connect(TextEmphasis, FIGMA_URL_TEXT_EMPHASIS, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextEmphasis>{text}</TextEmphasis>, | ||
}); | ||
figma.connect(TextLink, FIGMA_URL_TEXT_LINK, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextLink href="#">{text}</TextLink>, | ||
}); | ||
figma.connect(TextStrong, FIGMA_URL_TEXT_STRONG, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextStrong>{text}</TextStrong>, | ||
}); | ||
figma.connect(TextSmall, FIGMA_URL_TEXT_SMALL, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextSmall>{text}</TextSmall>, | ||
}); | ||
figma.connect(TextCode, FIGMA_URL_TEXT_CODE, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextCode>{text}</TextCode>, | ||
}); | ||
figma.connect(TextList, FIGMA_URL_TEXT_LIST, { | ||
props: { children: figma.children("Text List Item") }, | ||
example: ({ children }) => <TextList>{children}</TextList>, | ||
}); | ||
figma.connect(TextListItem, FIGMA_URL_TEXT_LIST_ITEM, { | ||
props: { text: figma.string("Text") }, | ||
example: ({ text }) => <TextListItem>{text}</TextListItem>, | ||
}); |