Skip to content

Commit 294c5a2

Browse files
committed
ui: theme fix for all component related to pricing page
1 parent 78e1357 commit 294c5a2

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

components/SwitchSubmitWithText.tsx

+10-8
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,24 @@ type Option = {
44
disabled?: boolean;
55
}
66

7-
function SwitchSubmitWithText(props: Readonly<{
8-
optionsList: Option[],
9-
selectedOption: string,
10-
setSelectedOption: (option: string) => void
7+
function SwitchSubmitWithText(props: Readonly<{
8+
optionsList: Option[],
9+
selectedOption: string,
10+
setSelectedOption: (option: string) => void
1111
}>) {
1212
const { optionsList, selectedOption, setSelectedOption } = props;
1313
return (
14-
<div className='flex items-center w-full rounded-xl bg-gray-100'>
14+
<div className='flex items-center w-full rounded-xl bg-primary'>
1515
{optionsList.map((item) => {
1616
return (
1717
<button
1818
key={item.value}
1919
onClick={() => { setSelectedOption(item.value) }}
20-
className={`text-center p-2 w-full rounded-xl cursor-pointer m-2 ${selectedOption === item.value ? 'bg-primary-main shadow shadow-slate-700' : null}`}>
21-
<h2 className={`sm:text-lg font-semibold ${selectedOption === item.value ? 'text-secondary-main' : 'text-secondary-dark'}`}
22-
>{item.label}</h2>
20+
className={`text-center p-2 w-full rounded-xl cursor-pointer m-2 ${selectedOption === item.value ? 'bg-secondary shadow shadow-slate-700' : null}`}
21+
>
22+
<h2 className={`sm:text-lg font-semibold ${selectedOption === item.value ? 'text-secondary-foreground' : 'text-primary-foreground'}`}>
23+
{item.label}
24+
</h2>
2325
</button>
2426
)
2527
})}

pages/pricing.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ const Pricing = () => {
144144
<div className='mb-16'>
145145
<Navbar transparent={false} />
146146
</div>
147-
<div id='pricing' className='w-full py-12 bg-primary-light'>
148-
<h2 className='font-bold text-center text-[2rem]'>Pricing <span className='text-[2rem] text-primary-main font-bold'>Plans</span></h2>
147+
<div id='pricing' className='w-full py-12'>
148+
<h2 className='font-bold text-center text-[2rem]'>Pricing <span className='text-[2rem] text-secondary font-bold'>Plans</span></h2>
149149
{(today <= pricingStartDate) ? (<p className='text-center -mt-2'><small>(Applicable after {readableDate(pricingStartDate)})</small></p>) : null}
150150

151151
<div className='m-auto md:grid w-4/5 mt-3 md:p-4 grid-cols-2 gap-5 h-fit'>
@@ -155,19 +155,19 @@ const Pricing = () => {
155155
<SwitchSubmitWithText optionsList={installationOptions} selectedOption={selectedInstallation} setSelectedOption={setSelectedInstallation} />
156156
<SwitchSubmitWithText optionsList={termOptions} selectedOption={term} setSelectedOption={onAnyPricingConfigClick(setTerm)} />
157157
</div>
158-
<div key={pricingPlans[pricingPlanIndex].buttonText} className="md:p-5 p-3 rounded-lg border-2 mt-7 w-full lg:w-5/6 xl:w-4/5 m-auto border-primary-main bg-primary-light shadow-md flex flex-col h-full">
158+
<div key={pricingPlans[pricingPlanIndex].buttonText} className="md:p-5 p-3 rounded-lg border-2 mt-7 w-full lg:w-5/6 xl:w-4/5 m-auto border-secondary bg-background shadow-md flex flex-col h-full">
159159
<h2 className='mx-auto font-semibold text-2xl text-center'>{pricingPlans[pricingPlanIndex].pricingName}</h2>
160160

161161
<div className='text-center h-16'>
162-
<p className='mt-2 font-medium text-xl text-primary-main'>{(pricingPlans[pricingPlanIndex].pricing) ? pricingPlans[pricingPlanIndex].pricing : getPriceString(term)}</p>
162+
<p className='mt-2 font-medium text-xl text-secondary'>{(pricingPlans[pricingPlanIndex].pricing) ? pricingPlans[pricingPlanIndex].pricing : getPriceString(term)}</p>
163163
<p className='text-base'>{((pricingPlans[pricingPlanIndex].duration && selectedInstallation === 'project') ? 'per user/month' : pricingPlans[pricingPlanIndex].duration)}</p>
164164
</div>
165165

166166
<ul className='mt-3.5 grow'>
167167
{features.map((feature) => {
168168
return (
169169
<li key={feature} className='text-lg ml-1 mb-2'>
170-
<AiOutlineCheckCircle className='text-primary-main w-5 inline mr-1' size={20} />
170+
<AiOutlineCheckCircle className='text-secondary w-5 inline mr-1' size={20} />
171171
{feature}
172172
</li>
173173
)

0 commit comments

Comments
 (0)