pricing page update

This commit is contained in:
bflatastic committed 2024-08-23 15:24:06 +07:00
1 parent 13bc66c42d
commit 69d150002e
4 files changed
+33 -11

No files matched your search

@@ -2,6 +2,7 @@
.fy-badge {
display: flex;
align-items: center;
font-weight: 600;
border-radius: 0.5rem;
font-size: 13px;
@@ -1,5 +1,7 @@
import React from "react";
import "./Badge.scss";
import { IconDefinition } from "@fortawesome/fontawesome-common-types";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
interface BadgeProps {
label: string;
@@ -7,18 +9,25 @@ interface BadgeProps {
overlay?: boolean;
className?: string;
small?: boolean;
icon?: IconDefinition;
}
export default function Badge({
label,
color = "gray", // should default to a visible state
color = "gray",
overlay = false,
className = "",
small = false,
icon,
}: BadgeProps) {
const badgeClass = `fy-badge badge-${color} ${
overlay ? "shadow" : ""
} mb-0 ${className} ${small ? "badge-small" : ""}`.trim();
return <span className={badgeClass}>{label}</span>;
return (
<span className={badgeClass}>
{icon && <FontAwesomeIcon icon={icon} className="me-1" />}
{label}
</span>
);
}
@@ -686,7 +686,7 @@ styles with important tags:
.pricing-border {
box-sizing: border-box;
box-shadow: inset 0px 0px 0px 3px $primary;
box-shadow: inset 0px 0px 0px 3px $primary !important;
}
ul.pricing-list {
@@ -17,9 +17,9 @@ import { WebUrl } from "../../../../common/WebUrl";
import { BeginStripeCheckoutFlow } from "../../../../common/BeginStripeCheckoutFlow";
import { usePrefixedDocumentTitle } from "../../../../common/UsePrefixedDocumentTitle";
import { PosthogClient } from "@storyteller/components/src/analytics/PosthogClient";
import { Container, Panel } from "components/common";
import { Badge, Container, Panel } from "components/common";
import MentionsSection from "components/common/MentionsSection";
import StorytellerStudioCTA from "components/common/StorytellerStudioCTA";
import { faStar } from "@fortawesome/pro-solid-svg-icons";
interface Props {
sessionWrapper: SessionWrapper;
@@ -91,7 +91,8 @@ function PricingPage(props: Props) {
let proButtonText = "Buy Pro";
let proButtonDisabled = false;
let proBorderCss = "rounded panel padding h-100";
let proBorderCss =
"rounded panel padding h-100 pricing-border position-relative";
let eliteButtonText = "Buy Elite";
let eliteButtonDisabled = false;
@@ -146,12 +147,12 @@ function PricingPage(props: Props) {
// Highlight the mid-tier plan if nothing is subscribed
if (!userHasPaidPremium) {
proBorderCss = "rounded panel padding h-100 pricing-border";
proBorderCss = "rounded panel padding h-100 pricing-border";
}
return (
<>
<Container type="panel">
<Container type="panel" className="mt-lg-3">
<Panel clear={true} className="text-center my-5">
<h1 className=" fw-bold">Pricing</h1>
{/* <p className="fs-5">
@@ -221,7 +222,7 @@ function PricingPage(props: Props) {
*/}
{/* Plus Tier */}
<div className="col-12 col-sm-6 col-lg-4">
<div className="col-12 col-sm-6 col-lg-4 pt-lg-5">
<div className="rounded panel padding h-100">
<h2 className="text-center my-2 fw-bold mb-4">
{FYP.plus.tier}
@@ -325,6 +326,17 @@ function PricingPage(props: Props) {
{/* Pro Tier */}
<div className="col-12 col-sm-6 col-lg-4">
<div className={proBorderCss}>
<div
className="d-flex justify-content-center mb-2 position-absolute"
style={{ top: "20px", right: "20px" }}
>
<Badge
label="Most Popular"
color="ultramarine"
icon={faStar}
/>
</div>
<h2 className="text-center my-2 fw-bold mb-4">
{FYP.pro.tier}
</h2>
@@ -475,7 +487,7 @@ function PricingPage(props: Props) {
</div>
{/* Elite Tier */}
<div className="col-12 col-sm-6 col-lg-4">
<div className="col-12 col-sm-6 col-lg-4 pt-lg-5">
<div className="rounded panel padding h-100">
<h2 className="text-center my-2 fw-bold mb-4">
{FYP.elite.tier}
@@ -753,7 +765,7 @@ function PricingPage(props: Props) {
<Container type="panel" className="py-5 mt-5 d-flex flex-column gap-5">
<MentionsSection />
<StorytellerStudioCTA />
{/* <StorytellerStudioCTA /> */}
</Container>
</>
);