Skip to content

Commit

Permalink
fixes pricing card usage in app (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-figma authored Sep 4, 2024
1 parent 2ac6125 commit 5cc4eaa
Showing 1 changed file with 15 additions and 28 deletions.
43 changes: 15 additions & 28 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import {
Text,
TextContentHeading,
TextHeading,
TextList,
TextListItem,
TextPrice,
} from "primitives";
import { AuthenticationProvider } from "providers";
Expand All @@ -42,6 +40,7 @@ function App() {
const [pricingInterval, setPricingInterval] = useState("monthly");
const intervalText = pricingInterval === "monthly" ? "month" : "year";
const annualRatio = pricingInterval === "monthly" ? 1 : 11;
const pricingSize = isDesktop ? "large" : "small";

return (
<AuthenticationProvider>
Expand Down Expand Up @@ -97,47 +96,35 @@ function App() {
<FlexItem>
<Flex wrap type="third" gap="1200">
<PricingCard
size={pricingSize}
action="Select"
actionVariant="neutral"
heading="Free"
price={(0 * annualRatio).toString()}
pricePer={`/ ${intervalText}`}
list={
<TextList>
<TextListItem>List item 1</TextListItem>
<TextListItem>List item 2</TextListItem>
<TextListItem>List item 3</TextListItem>
</TextList>
}
priceCurrency="$"
priceLabel={`/ ${intervalText}`}
list={["List item 1", "List item 2", "List item 3"]}
onAction={() => {}}
/>
<PricingCard
size={pricingSize}
action="Select"
actionVariant="neutral"
variant="brand"
heading="Starter"
price={(50 * annualRatio).toString()}
pricePer={`/ ${intervalText}`}
list={
<TextList>
<TextListItem>List item 1</TextListItem>
<TextListItem>List item 2</TextListItem>
<TextListItem>List item 3</TextListItem>
</TextList>
}
priceCurrency="$"
priceLabel={`/ ${intervalText}`}
list={["List item 1", "List item 2", "List item 3"]}
onAction={() => {}}
/>
<PricingCard
size={pricingSize}
action="Select"
actionVariant="neutral"
heading="Enterprise"
price={(150 * annualRatio).toString()}
pricePer={`/ ${intervalText}`}
list={
<TextList>
<TextListItem>List item 1</TextListItem>
<TextListItem>List item 2</TextListItem>
<TextListItem>List item 3</TextListItem>
</TextList>
}
priceCurrency="$"
priceLabel={`/ ${intervalText}`}
list={["List item 1", "List item 2", "List item 3"]}
onAction={() => {}}
/>
</Flex>
Expand Down

0 comments on commit 5cc4eaa

Please sign in to comment.