-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add .env.local and .env.<mode> to be read from Vite and Astro config Remove local env variables from Makefile * add xxl size for Modal * adapt text for different plans * Create plans.md * Update plans.astro to load content from content page * Update config.ts * Update PlansModal.tsx * Create PlansModalFeatureRow.tsx * Update constants.ts * refine plans * Update Page.tsx --------- Co-authored-by: Daniele Guido <1181642+danieleguido@users.noreply.github.com>
- Loading branch information
1 parent
0509d29
commit d9f690f
Showing
16 changed files
with
353 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,4 @@ static/data/ | |
src/styles/fonts.css | ||
impresso-datalab.code-workspace | ||
.env.development | ||
.env.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { Xmark } from "iconoir-react" | ||
import { Row, Col } from "react-bootstrap" | ||
import PlanFeatureCard from "./PlanFeatureCard" | ||
import type { Plan } from "./PlanCard" | ||
|
||
const BootstrapColumnLayoutForLabels = { | ||
lg: 2, | ||
className: "very-small", | ||
} | ||
|
||
export type PlansModalFeatureRowProps = { | ||
plans: Plan[] | ||
label: string | ||
featureIds?: string[] | ||
className?: string | ||
} | ||
|
||
const PlansModalFeatureRow: React.FC<PlansModalFeatureRowProps> = ({ | ||
label = "", | ||
featureIds = [], | ||
plans = [], | ||
className = "", | ||
}) => { | ||
return ( | ||
<Row className={`PlansModalFeatureRow ${className}`}> | ||
<Col | ||
{...BootstrapColumnLayoutForLabels} | ||
dangerouslySetInnerHTML={{ | ||
__html: label, | ||
}} | ||
></Col> | ||
{plans.map((plan) => { | ||
return ( | ||
<Col key={plan.id}> | ||
<Row className="d-flex align-items-center h-100"> | ||
{featureIds.map((ref, i) => { | ||
const feature = plan.features.find((f) => f.ref === ref) | ||
const hasBorder = | ||
featureIds.length > 1 && i < featureIds.length - 1 | ||
return ( | ||
<Col | ||
key={ref} | ||
className={`d-flex justify-content-center align-items-center ${ | ||
hasBorder ? "border-end" : "" | ||
}`} | ||
> | ||
{feature ? ( | ||
<PlanFeatureCard feature={feature} /> | ||
) : ( | ||
<Xmark /> | ||
)} | ||
</Col> | ||
) | ||
})} | ||
</Row> | ||
</Col> | ||
) | ||
})} | ||
</Row> | ||
) | ||
} | ||
export default PlansModalFeatureRow |
Oops, something went wrong.