-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #486 from ably/14.6.0-pricing-stuff
[WEB-3841] 14.6.0 - PricingCards component
- Loading branch information
Showing
17 changed files
with
2,144 additions
and
46 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
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,41 @@ | ||
import React from "react"; | ||
import PricingCards, { PricingCardsProps } from "./PricingCards"; | ||
import { consumptionData, planData } from "./data"; | ||
|
||
export default { | ||
title: "Features/Pricing Cards", | ||
component: PricingCards, | ||
tags: ["autodocs"], | ||
parameters: { | ||
docs: { | ||
description: { | ||
component: | ||
"A reusable component that forms the basis of two sections of the pricing page. It is used to display pricing plans and consumption pricing. The presence of a `delimiter` prop changes the UX to focus around intermediate icon columns.", | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
const Template = ({ data, theme = "dark", delimiter }: PricingCardsProps) => ( | ||
<div className={`${theme === "dark" ? "bg-neutral-1300" : ""} p-32`}> | ||
<PricingCards data={data} theme={theme} delimiter={delimiter} /> | ||
</div> | ||
); | ||
|
||
export const PlansDarkMode = { | ||
render: () => <Template data={planData} />, | ||
}; | ||
|
||
export const PlansLightMode = { | ||
render: () => <Template data={planData} theme="light" />, | ||
}; | ||
|
||
export const ConsumptionDarkMode = { | ||
render: () => <Template data={consumptionData} delimiter="icon-gui-plus" />, | ||
}; | ||
|
||
export const ConsumptionLightMode = { | ||
render: () => ( | ||
<Template data={consumptionData} theme="light" delimiter="icon-gui-plus" /> | ||
), | ||
}; |
Oops, something went wrong.