docs: fix pricing page on small devices (#13617)
This commit is contained in:
1 parent
da411e351a
commit
97cc8fdc15
2 files changed
+23
-13
No files matched your search
@@ -13,6 +13,7 @@ import {
|
|||||||
CurrencyDollar,
|
CurrencyDollar,
|
||||||
ServerStack,
|
ServerStack,
|
||||||
Shopping,
|
Shopping,
|
||||||
|
Users,
|
||||||
WIP,
|
WIP,
|
||||||
} from "@medusajs/icons"
|
} from "@medusajs/icons"
|
||||||
|
|
||||||
@@ -56,6 +57,7 @@ const featureIcons: Record<string, React.FC> = {
|
|||||||
"Hosting & Deployment": ServerStack,
|
"Hosting & Deployment": ServerStack,
|
||||||
"Compute & Resources": WIP,
|
"Compute & Resources": WIP,
|
||||||
"Organization & Billing": CurrencyDollar,
|
"Organization & Billing": CurrencyDollar,
|
||||||
|
"Medusa Support": Users,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper function to render Block content (Sanity rich text)
|
// Helper function to render Block content (Sanity rich text)
|
||||||
@@ -97,11 +99,11 @@ const FeatureSections: React.FC<FeatureSectionsProps> = ({
|
|||||||
// Calculate consistent column widths
|
// Calculate consistent column widths
|
||||||
// Use fractional units to ensure all grids have matching column sizes
|
// Use fractional units to ensure all grids have matching column sizes
|
||||||
const featureNameFraction = 2 // Feature name gets 2 units
|
const featureNameFraction = 2 // Feature name gets 2 units
|
||||||
const featureColumnFraction = 1 // Each feature column gets 1 unit
|
const featureColumnFraction = `minmax(0, 1fr)` // Each feature column gets 1 unit
|
||||||
const gridTemplate = `${featureNameFraction}fr repeat(${columnCount}, ${featureColumnFraction}fr)`
|
const gridTemplate = `${featureNameFraction}fr repeat(${columnCount}, ${featureColumnFraction})`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full flex flex-col rounded shadow-elevation-card-rest dark:shadow-elevation-card-rest-dark">
|
<div className="w-full flex flex-col rounded shadow-elevation-card-rest dark:shadow-elevation-card-rest-dark overflow-hidden">
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div
|
<div
|
||||||
className="w-full grid gap-0 rounded-t"
|
className="w-full grid gap-0 rounded-t"
|
||||||
@@ -110,8 +112,10 @@ const FeatureSections: React.FC<FeatureSectionsProps> = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Features label column */}
|
{/* Features label column */}
|
||||||
<div className="flex items-center justify-start px-1.5 py-1 border-solid border-r border-medusa-border-base">
|
<div className="flex items-center justify-start p-0.5 sm:px-1.5 sm:py-1 border-solid border-r border-medusa-border-base">
|
||||||
<p className="txt-large text-medusa-fg-subtle">Features</p>
|
<p className="txt-medium sm:txt-large text-medusa-fg-subtle">
|
||||||
|
Features
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Column headers */}
|
{/* Column headers */}
|
||||||
@@ -119,12 +123,12 @@ const FeatureSections: React.FC<FeatureSectionsProps> = ({
|
|||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"flex items-center justify-center px-1 py-1 bg-medusa-bg-base",
|
"flex items-center justify-center p-0.25 sm:p-1 bg-medusa-bg-base",
|
||||||
index !== columns.length - 1 &&
|
index !== columns.length - 1 &&
|
||||||
"border-solid border-r border-medusa-border-base"
|
"border-solid border-r border-medusa-border-base"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<p className="txt-large text-medusa-fg-base text-left w-full">
|
<p className="txt-medium sm:txt-large text-medusa-fg-base text-left w-full">
|
||||||
{column}
|
{column}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -167,7 +171,7 @@ const FeatureSections: React.FC<FeatureSectionsProps> = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Feature name column */}
|
{/* Feature name column */}
|
||||||
<div className="px-1 py-1 flex items-center justify-start border-solid border-r border-medusa-border-base">
|
<div className="p-0.25 sm:p-1 flex items-center justify-start border-solid border-r border-medusa-border-base">
|
||||||
<p className="txt-medium-plus text-medusa-fg-base">
|
<p className="txt-medium-plus text-medusa-fg-base">
|
||||||
<MarkdownContent
|
<MarkdownContent
|
||||||
allowedElements={["br", "a"]}
|
allowedElements={["br", "a"]}
|
||||||
@@ -189,7 +193,7 @@ const FeatureSections: React.FC<FeatureSectionsProps> = ({
|
|||||||
<div
|
<div
|
||||||
key={colIndex}
|
key={colIndex}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"px-1 py-1 flex items-center justify-center",
|
"p-0.25 sm:p-1 flex items-center justify-center",
|
||||||
colIndex !== columnCount - 1 &&
|
colIndex !== columnCount - 1 &&
|
||||||
"border-solid border-r border-medusa-border-base"
|
"border-solid border-r border-medusa-border-base"
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -20,12 +20,18 @@ const HeroPricing: React.FC<HeroPricingProps> = ({ data }) => {
|
|||||||
{/* Header Row */}
|
{/* Header Row */}
|
||||||
<div className="flex items-start justify-start">
|
<div className="flex items-start justify-start">
|
||||||
{/* Main content area */}
|
{/* Main content area */}
|
||||||
<div className="w-full flex items-center justify-start">
|
<div
|
||||||
|
className="w-full grid gap-0"
|
||||||
|
style={{
|
||||||
|
gridTemplateColumns: `repeat(${data.options.length}, minmax(0, 1fr))`,
|
||||||
|
gridTemplateRows: "auto 1fr auto",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{data.options.map((option, index) => (
|
{data.options.map((option, index) => (
|
||||||
<React.Fragment key={option._key}>
|
<React.Fragment key={option._key}>
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
`flex-1 min-w-0 p-1`,
|
`p-1`,
|
||||||
index !== data.options.length - 1 &&
|
index !== data.options.length - 1 &&
|
||||||
"border-solid border-r border-medusa-border-base",
|
"border-solid border-r border-medusa-border-base",
|
||||||
index === data.options.length - 1 &&
|
index === data.options.length - 1 &&
|
||||||
@@ -59,9 +65,9 @@ const HeroPricing: React.FC<HeroPricingProps> = ({ data }) => {
|
|||||||
|
|
||||||
{/* Features and Buttons Row */}
|
{/* Features and Buttons Row */}
|
||||||
<div
|
<div
|
||||||
className="w-full grid gap-0"
|
className="w-full grid gap-0 overflow-hidden"
|
||||||
style={{
|
style={{
|
||||||
gridTemplateColumns: `repeat(${data.options.length}, 1fr)`,
|
gridTemplateColumns: `repeat(${data.options.length}, minmax(0, 1fr))`,
|
||||||
gridTemplateRows: "auto 1fr auto",
|
gridTemplateRows: "auto 1fr auto",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in new issue
Block a user