Inline
This commit is contained in:
parent
07d75a5dea
commit
54e8cd498f
2 changed files with 33 additions and 30 deletions
|
@ -1,28 +0,0 @@
|
|||
import { SpaceBetweenFlex } from "@ente/shared/components/Container";
|
||||
import ArrowForward from "@mui/icons-material/ArrowForward";
|
||||
import { Box, IconButton, styled, Typography } from "@mui/material";
|
||||
import { t } from "i18next";
|
||||
|
||||
const RowContainer = styled(SpaceBetweenFlex)(({ theme }) => ({
|
||||
gap: theme.spacing(1.5),
|
||||
padding: theme.spacing(1.5, 1),
|
||||
cursor: "pointer",
|
||||
"&:hover .endIcon": {
|
||||
backgroundColor: "rgba(255,255,255,0.08)",
|
||||
},
|
||||
}));
|
||||
export function FreePlanRow({ closeModal }) {
|
||||
return (
|
||||
<RowContainer onClick={closeModal}>
|
||||
<Box>
|
||||
<Typography> {t("FREE_PLAN_OPTION_LABEL")}</Typography>
|
||||
<Typography variant="small" color="text.muted">
|
||||
{t("FREE_PLAN_DESCRIPTION")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<IconButton className={"endIcon"}>
|
||||
<ArrowForward />
|
||||
</IconButton>
|
||||
</RowContainer>
|
||||
);
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
import { Stack } from "@mui/material";
|
||||
import { SpaceBetweenFlex } from "@ente/shared/components/Container";
|
||||
import ArrowForward from "@mui/icons-material/ArrowForward";
|
||||
import { Box, IconButton, Stack, Typography, styled } from "@mui/material";
|
||||
import { PLAN_PERIOD } from "constants/gallery";
|
||||
import { t } from "i18next";
|
||||
import { Plan, Subscription } from "types/billing";
|
||||
import { BonusData } from "types/user";
|
||||
import {
|
||||
|
@ -8,7 +11,6 @@ import {
|
|||
isPopularPlan,
|
||||
isUserSubscribedPlan,
|
||||
} from "utils/billing";
|
||||
import { FreePlanRow } from "./FreePlanRow";
|
||||
import { PlanRow } from "./planRow";
|
||||
|
||||
interface Iprops {
|
||||
|
@ -48,3 +50,32 @@ const Plans = ({
|
|||
);
|
||||
|
||||
export default Plans;
|
||||
|
||||
interface FreePlanRowProps {
|
||||
closeModal: () => void;
|
||||
}
|
||||
|
||||
const FreePlanRow: React.FC<FreePlanRowProps> = ({ closeModal }) => {
|
||||
return (
|
||||
<FreePlanRow_ onClick={closeModal}>
|
||||
<Box>
|
||||
<Typography> {t("FREE_PLAN_OPTION_LABEL")}</Typography>
|
||||
<Typography variant="small" color="text.muted">
|
||||
{t("FREE_PLAN_DESCRIPTION")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<IconButton className={"endIcon"}>
|
||||
<ArrowForward />
|
||||
</IconButton>
|
||||
</FreePlanRow_>
|
||||
);
|
||||
};
|
||||
|
||||
const FreePlanRow_ = styled(SpaceBetweenFlex)(({ theme }) => ({
|
||||
gap: theme.spacing(1.5),
|
||||
padding: theme.spacing(1.5, 1),
|
||||
cursor: "pointer",
|
||||
"&:hover .endIcon": {
|
||||
backgroundColor: "rgba(255,255,255,0.08)",
|
||||
},
|
||||
}));
|
||||
|
|
Loading…
Add table
Reference in a new issue