@@ -6,11 +6,12 @@ import Button from 'components/ui/Button';
6
6
import { postData } from 'utils/helpers' ;
7
7
import { getStripe } from 'utils/stripe-client' ;
8
8
import { useUser } from 'utils/useUser' ;
9
- import { Product , Price , ProductWithPrice } from 'types' ;
9
+ import { Price , ProductWithPrice } from 'types' ;
10
10
11
11
interface Props {
12
12
products : ProductWithPrice [ ] ;
13
13
}
14
+
14
15
type BillingInterval = 'year' | 'month' ;
15
16
16
17
export default function Pricing ( { products } : Props ) {
@@ -54,7 +55,7 @@ export default function Pricing({ products }: Props) {
54
55
< p className = "text-6xl font-extrabold text-white sm:text-center sm:text-6xl" >
55
56
No subscription pricing plans found. Create them in your{ ' ' }
56
57
< a
57
- className = "text-pink underline"
58
+ className = "text-pink-500 underline"
58
59
href = "https://dashboard.stripe.com/products"
59
60
rel = "noopener noreferrer"
60
61
target = "_blank"
@@ -74,19 +75,19 @@ export default function Pricing({ products }: Props) {
74
75
< h1 className = "text-4xl font-extrabold text-white sm:text-center sm:text-6xl" >
75
76
Pricing Plans
76
77
</ h1 >
77
- < p className = "mt-5 text-xl text-accents-6 sm:text-center sm:text-2xl max-w-2xl m-auto" >
78
+ < p className = "mt-5 text-xl text-gray-200 sm:text-center sm:text-2xl max-w-2xl m-auto" >
78
79
Start building for free, then add a site plan to go live. Account
79
80
plans unlock additional features.
80
81
</ p >
81
- < div className = "relative self-center mt-6 bg-primary-2 rounded-lg p-0.5 flex sm:mt-8 border border-accents-0 " >
82
+ < div className = "relative self-center mt-6 bg-gray-900 rounded-lg p-0.5 flex sm:mt-8 border border-gray-800 " >
82
83
< button
83
84
onClick = { ( ) => setBillingInterval ( 'month' ) }
84
85
type = "button"
85
86
className = { `${
86
87
billingInterval === 'month'
87
- ? 'relative w-1/2 bg-accents-1 border-accents-0 shadow-sm text-white'
88
- : 'ml-0.5 relative w-1/2 border border-transparent text-accents-4 '
89
- } rounded-md m-1 py-2 text-sm font-medium whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-pink focus:ring-opacity-50 focus:z-10 sm:w-auto sm:px-8`}
88
+ ? 'relative w-1/2 bg-gray-700 border-gray-800 shadow-sm text-white'
89
+ : 'ml-0.5 relative w-1/2 border border-transparent text-gray-400 '
90
+ } rounded-md m-1 py-2 text-sm font-medium whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-pink-500 focus:ring-opacity-50 focus:z-10 sm:w-auto sm:px-8`}
90
91
>
91
92
Monthly billing
92
93
</ button >
@@ -95,9 +96,9 @@ export default function Pricing({ products }: Props) {
95
96
type = "button"
96
97
className = { `${
97
98
billingInterval === 'year'
98
- ? 'relative w-1/2 bg-accents-1 border-accents-0 shadow-sm text-white'
99
- : 'ml-0.5 relative w-1/2 border border-transparent text-accents-4 '
100
- } rounded-md m-1 py-2 text-sm font-medium whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-pink focus:ring-opacity-50 focus:z-10 sm:w-auto sm:px-8`}
99
+ ? 'relative w-1/2 bg-gray-700 border-gray-800 shadow-sm text-white'
100
+ : 'ml-0.5 relative w-1/2 border border-transparent text-gray-400 '
101
+ } rounded-md m-1 py-2 text-sm font-medium whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-pink-500 focus:ring-opacity-50 focus:z-10 sm:w-auto sm:px-8`}
101
102
>
102
103
Yearly billing
103
104
</ button >
@@ -118,9 +119,9 @@ export default function Pricing({ products }: Props) {
118
119
< div
119
120
key = { product . id }
120
121
className = { cn (
121
- 'rounded-lg shadow-sm divide-y divide-accents-2 bg-primary-2 ' ,
122
+ 'rounded-lg shadow-sm divide-y divide-gray-600 bg-gray-900 ' ,
122
123
{
123
- 'border border-pink' : subscription
124
+ 'border border-pink-500 ' : subscription
124
125
? product . name ===
125
126
subscription ?. prices ?. products ?. [ 0 ] ?. name
126
127
: product . name === 'Freelancer'
@@ -131,12 +132,12 @@ export default function Pricing({ products }: Props) {
131
132
< h2 className = "text-2xl leading-6 font-semibold text-white" >
132
133
{ product . name }
133
134
</ h2 >
134
- < p className = "mt-4 text-accents-5 " > { product . description } </ p >
135
+ < p className = "mt-4 text-gray-300 " > { product . description } </ p >
135
136
< p className = "mt-8" >
136
137
< span className = "text-5xl font-extrabold white" >
137
138
{ priceString }
138
139
</ span >
139
- < span className = "text-base font-medium text-accents-8 " >
140
+ < span className = "text-base font-medium text-gray-100 " >
140
141
/{ billingInterval }
141
142
</ span >
142
143
</ p >
@@ -158,7 +159,7 @@ export default function Pricing({ products }: Props) {
158
159
} ) }
159
160
</ div >
160
161
< div >
161
- < p className = "mt-24 text-xs uppercase text-accents-3 text-center font-bold tracking-widest " >
162
+ < p className = "mt-24 text-xs uppercase text-gray-400 text-center font-bold tracking-[0.3em] " >
162
163
Brought to you by
163
164
</ p >
164
165
< div className = "flex flex-col items-center my-12 space-y-4 sm:mt-8 sm:space-y-0 md:mx-auto md:max-w-2xl sm:grid sm:gap-6 sm:grid-cols-5" >
@@ -167,7 +168,7 @@ export default function Pricing({ products }: Props) {
167
168
< img
168
169
src = "/nextjs.svg"
169
170
alt = "Next.js Logo"
170
- className = "h-12 text-primary "
171
+ className = "h-12 text-white "
171
172
/>
172
173
</ a >
173
174
</ div >
@@ -176,7 +177,7 @@ export default function Pricing({ products }: Props) {
176
177
< img
177
178
src = "/vercel.svg"
178
179
alt = "Vercel.com Logo"
179
- className = "h-6 text-primary "
180
+ className = "h-6 text-white "
180
181
/>
181
182
</ a >
182
183
</ div >
@@ -185,7 +186,7 @@ export default function Pricing({ products }: Props) {
185
186
< img
186
187
src = "/stripe.svg"
187
188
alt = "stripe.com Logo"
188
- className = "h-12 text-primary "
189
+ className = "h-12 text-white "
189
190
/>
190
191
</ a >
191
192
</ div >
@@ -194,7 +195,7 @@ export default function Pricing({ products }: Props) {
194
195
< img
195
196
src = "/supabase.svg"
196
197
alt = "supabase.io Logo"
197
- className = "h-10 text-primary "
198
+ className = "h-10 text-white "
198
199
/>
199
200
</ a >
200
201
</ div >
@@ -203,7 +204,7 @@ export default function Pricing({ products }: Props) {
203
204
< img
204
205
src = "/github.svg"
205
206
alt = "github.com Logo"
206
- className = "h-8 text-primary "
207
+ className = "h-8 text-white "
207
208
/>
208
209
</ a >
209
210
</ div >
0 commit comments