From 44bac43b1c24d62e331348ad846ce08e81046a2e Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 20 Jan 2023 19:55:35 +0000 Subject: [PATCH] Add the pricing example --- src/components/Button.astro | 16 +++-- src/pages/album.astro | 2 +- src/pages/index.astro | 3 +- src/pages/pricing.astro | 114 ++++++++++++++++++++++++++++++++++++ 4 files changed, 129 insertions(+), 6 deletions(-) create mode 100644 src/pages/pricing.astro diff --git a/src/components/Button.astro b/src/components/Button.astro index 7ebaa78..30a41d9 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -1,21 +1,29 @@ --- interface Props { + inverted: boolean; shape: "square" | "rounded"; + size?: "large"; text: string; type: "primary" | "secondary"; } -const { shape, text, type } = Astro.props as Props; +const { inverted, shape, size, text, type } = Astro.props as Props; --- - +

diff --git a/src/pages/index.astro b/src/pages/index.astro index c62948f..bfaa7cf 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -4,7 +4,8 @@ import BaseLayout from "../layouts/BaseLayout.astro"; const title = "Bootstrap examples with Tailwind CSS" const examples = [ - { title: "Album", url: "/album" } + { title: "Album", url: "/album" }, + { title: "Pricing", url: "/pricing" }, ] --- diff --git a/src/pages/pricing.astro b/src/pages/pricing.astro new file mode 100644 index 0000000..e0ed15d --- /dev/null +++ b/src/pages/pricing.astro @@ -0,0 +1,114 @@ +--- +import BaseLayout from "../layouts/BaseLayout.astro"; +import Button from "../components/Button.astro"; + +interface Price { + button: { + text: string; + }; + features: string[]; + name: string; + price: number; +} + +export const name = "Pricing"; +export const prices: Price[] = [ + { + name: "Full", + price: 0, + features: [ + "10 users included", + "2 GB of storage", + "Email support", + "Help center access", + ], + button: { + text: "Sign up for free", + }, + }, + { + name: "Pro", + price: 15, + features: [ + "20 users included", + "10 GB of storage", + "Priority email support", + "Help center access", + ], + button: { + text: "Get started", + }, + }, + { + name: "Enterprise", + price: 29, + features: [ + "30 users included", + "15 GB of storage", + "Phone and email support", + "Help center access", + ], + button: { + text: "Contact us", + }, + }, +]; +--- + + + + +

+
+

{name}

+

+ Quickly build an effective pricing table for your potential customers + with this Bootstrap example. It's built with default Bootstrap + components and utilities with little customization. +

+
+
+ +
+ { + prices.map((price, i) => ( +
+

+ {price.name} +

+ +
+

+ ${price.price} + + / month + +

+ +
+

Features

+ +
    + {price.features.map((feature) => ( +
  • {feature}
  • + ))} +
+
+ +
+
+
+
+ )) + } +
+