Update UI styling in dashboard, pricing, and marketing
The changes include UI styling updates across dashboard, pricing, and marketing components. This involves updating animations and slide-in effects on the dashboard demo component, adjusting color schemes, animations, and spacing on pricing related components, and modifying layout and spacing on the marketing page. Other subtle style changes like font weights, colors and sizes were also addressed.
This commit is contained in:
@@ -215,7 +215,11 @@ function Chart(
|
|||||||
props: React.PropsWithChildren<{ data: { value: string; name: string }[] }>,
|
props: React.PropsWithChildren<{ data: { value: string; name: string }[] }>,
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<div className={'h-36'}>
|
<div
|
||||||
|
className={
|
||||||
|
'h-36 duration-200 animate-in fade-in slide-in-from-left-4 slide-in-from-top-4'
|
||||||
|
}
|
||||||
|
>
|
||||||
<ResponsiveContainer width={'100%'} height={'100%'}>
|
<ResponsiveContainer width={'100%'} height={'100%'}>
|
||||||
<LineChart
|
<LineChart
|
||||||
width={400}
|
width={400}
|
||||||
|
|||||||
@@ -18,13 +18,11 @@ async function PricingPage() {
|
|||||||
const { t } = await createI18nServerInstance();
|
const { t } = await createI18nServerInstance();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'container mx-auto'}>
|
<div className={'container mx-auto mt-8 flex flex-col space-y-12'}>
|
||||||
<div className={'my-8 flex flex-col space-y-16'}>
|
<SitePageHeader
|
||||||
<SitePageHeader
|
title={t('marketing:pricing')}
|
||||||
title={t('marketing:pricing')}
|
subtitle={t('marketing:pricingSubtitle')}
|
||||||
subtitle={t('marketing:pricingSubtitle')}
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<PricingTable paths={pathsConfig.auth} config={billingConfig} />
|
<PricingTable paths={pathsConfig.auth} config={billingConfig} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export function PricingTable({
|
|||||||
const [interval, setInterval] = useState(intervals[0]!);
|
const [interval, setInterval] = useState(intervals[0]!);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'flex flex-col space-y-12'}>
|
<div className={'flex flex-col space-y-8'}>
|
||||||
<div className={'flex justify-center'}>
|
<div className={'flex justify-center'}>
|
||||||
{intervals.length ? (
|
{intervals.length ? (
|
||||||
<PlanIntervalSwitcher
|
<PlanIntervalSwitcher
|
||||||
@@ -137,10 +137,10 @@ function PricingItem(
|
|||||||
data-cy={'subscription-plan'}
|
data-cy={'subscription-plan'}
|
||||||
className={cn(
|
className={cn(
|
||||||
props.className,
|
props.className,
|
||||||
`s-full flex flex-1 grow flex-col items-stretch justify-between space-y-8 self-stretch
|
`s-full flex flex-1 grow flex-col items-stretch
|
||||||
p-8 lg:w-4/12 xl:max-w-[22rem] xl:p-10`,
|
justify-between space-y-8 self-stretch p-8 lg:w-4/12 xl:max-w-[22rem] xl:p-10`,
|
||||||
{
|
{
|
||||||
['border-primary border-2']: highlighted,
|
['bg-primary text-primary-foreground border-primary']: highlighted,
|
||||||
},
|
},
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
@@ -172,7 +172,11 @@ function PricingItem(
|
|||||||
</If>
|
</If>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span className={cn(`text-muted-foreground text-sm`)}>
|
<span
|
||||||
|
className={cn(`text-sm text-current`, {
|
||||||
|
['text-muted-foreground']: !highlighted,
|
||||||
|
})}
|
||||||
|
>
|
||||||
<Trans
|
<Trans
|
||||||
i18nKey={props.product.description}
|
i18nKey={props.product.description}
|
||||||
defaults={props.product.description}
|
defaults={props.product.description}
|
||||||
@@ -186,7 +190,14 @@ function PricingItem(
|
|||||||
</Price>
|
</Price>
|
||||||
|
|
||||||
<If condition={props.plan.name}>
|
<If condition={props.plan.name}>
|
||||||
<span className={cn(`text-muted-foreground capitalize`)}>
|
<span
|
||||||
|
className={cn(
|
||||||
|
`animate-in slide-in-from-left-4 fade-in capitalize`,
|
||||||
|
{
|
||||||
|
['text-muted-foreground']: !highlighted,
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
>
|
||||||
<span className={'text-sm'}>
|
<span className={'text-sm'}>
|
||||||
<If
|
<If
|
||||||
condition={props.plan.interval}
|
condition={props.plan.interval}
|
||||||
@@ -201,7 +212,12 @@ function PricingItem(
|
|||||||
</If>
|
</If>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={'text-current'}>
|
<div
|
||||||
|
className={cn({
|
||||||
|
['text-muted-foreground']: !highlighted,
|
||||||
|
['text-primary-foreground']: highlighted,
|
||||||
|
})}
|
||||||
|
>
|
||||||
<FeaturesList features={props.product.features} />
|
<FeaturesList features={props.product.features} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -248,12 +264,8 @@ function FeaturesList(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Price({ children }: React.PropsWithChildren) {
|
function Price({ children }: React.PropsWithChildren) {
|
||||||
// little trick to re-animate the price when switching plans
|
|
||||||
const key = Math.random();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={key}
|
|
||||||
className={`animate-in slide-in-from-left-4 fade-in items-center duration-500`}
|
className={`animate-in slide-in-from-left-4 fade-in items-center duration-500`}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@@ -274,7 +286,7 @@ function ListItem({ children }: React.PropsWithChildren) {
|
|||||||
<CheckCircle className={'h-4 text-green-600'} />
|
<CheckCircle className={'h-4 text-green-600'} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span className={'text-muted-foreground text-sm'}>{children}</span>
|
<span className={'text-sm'}>{children}</span>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -294,9 +306,9 @@ function PlanIntervalSwitcher(
|
|||||||
const className = cn('focus:!ring-0 !outline-none', {
|
const className = cn('focus:!ring-0 !outline-none', {
|
||||||
'rounded-r-none border-r-transparent': index === 0,
|
'rounded-r-none border-r-transparent': index === 0,
|
||||||
'rounded-l-none': index === props.intervals.length - 1,
|
'rounded-l-none': index === props.intervals.length - 1,
|
||||||
['hover:bg-gray-50 dark:hover:bg-background/80']: !selected,
|
['hover:bg-muted']: !selected,
|
||||||
['text-primary-800 dark:text-primary-500 font-semibold' +
|
['font-semibold cursor-default bg-muted hover:bg-muted hover:text-initial']:
|
||||||
' hover:bg-background hover:text-initial']: selected,
|
selected,
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -308,7 +320,7 @@ function PlanIntervalSwitcher(
|
|||||||
>
|
>
|
||||||
<span className={'flex items-center space-x-1'}>
|
<span className={'flex items-center space-x-1'}>
|
||||||
<If condition={selected}>
|
<If condition={selected}>
|
||||||
<CheckCircle className={'h-4 text-green-500'} />
|
<CheckCircle className={'animate-in fade-in h-4'} />
|
||||||
</If>
|
</If>
|
||||||
|
|
||||||
<span className={'capitalize'}>
|
<span className={'capitalize'}>
|
||||||
@@ -347,7 +359,7 @@ function DefaultCheckoutButton(
|
|||||||
<Button
|
<Button
|
||||||
size={'lg'}
|
size={'lg'}
|
||||||
className={'w-full'}
|
className={'w-full'}
|
||||||
variant={props.highlighted ? 'default' : 'outline'}
|
variant={props.highlighted ? 'secondary' : 'outline'}
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<Trans i18nKey={label} defaults={label} />
|
<Trans i18nKey={label} defaults={label} />
|
||||||
|
|||||||
Reference in New Issue
Block a user