Skip to content

Commit cc0cbf5

Browse files
authored
Merge pull request #7 from Adamkaram/sweep/pricing-section
Add Pricing section to home page
2 parents b5b523f + ab30a79 commit cc0cbf5

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed

app/Pricing.tsx

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import React from 'react';
2+
3+
const Pricing = () => {
4+
const pricingOptions = [
5+
{ title: 'Basic', price: '$10', features: ['Feature 1', 'Feature 2', 'Feature 3'] },
6+
{ title: 'Premium', price: '$20', features: ['Feature 1', 'Feature 2', 'Feature 3', 'Feature 4'] },
7+
{ title: 'Pro', price: '$30', features: ['Feature 1', 'Feature 2', 'Feature 3', 'Feature 4', 'Feature 5'] },
8+
];
9+
10+
return (
11+
<div className="container mx-auto py-10">
12+
<h2 className="text-4xl font-bold text-center mb-10">Pricing</h2>
13+
<div className="flex justify-around">
14+
{pricingOptions.map((option, index) => (
15+
<PricingOption key={index} option={option} />
16+
))}
17+
</div>
18+
</div>
19+
);
20+
};
21+
22+
const PricingOption = ({ option }) => {
23+
return (
24+
<div className="border rounded-lg p-5">
25+
<h3 className="text-2xl font-bold text-center mb-5">{option.title}</h3>
26+
<p className="text-xl text-center mb-5">{option.price}</p>
27+
<ul>
28+
{option.features.map((feature, index) => (
29+
<li key={index} className="mb-2">{feature}</li>
30+
))}
31+
</ul>
32+
</div>
33+
);
34+
};
35+
36+
export default Pricing;

app/page.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import Image from "next/image";
44
import Link from "next/link";
55
import SearchInput from './searchInput';
6+
import Pricing from './Pricing';
67
export default function Home() {
78
return (
89
<main
@@ -110,7 +111,7 @@ export default function Home() {
110111
</div>
111112
</div>
112113
<SearchInput/>
113-
114+
<Pricing/>
114115
</main>
115116
);
116-
}
117+
}

tailwind.config.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ module.exports = {
1010
center : "true"
1111
},
1212
extend: {
13+
colors: {
14+
'pricing': '#ff8a05',
15+
},
16+
spacing: {
17+
'pricing': '1rem',
18+
},
19+
typography: {
20+
'pricing': { fontSize: '1.5rem' },
21+
},
1322
backgroundImage: {
1423
'bgs': "url('../public/banner-bg.png')",
1524
},
@@ -40,4 +49,4 @@ module.exports = {
4049
},
4150
},
4251
plugins: [require("daisyui")],
43-
};
52+
};

0 commit comments

Comments
 (0)