Skip to content

Commit 9aa907c

Browse files
authored
Tooltip update
Signed-off-by: Naman Verma <149177973+Namanv0509@users.noreply.github.com>
1 parent a3204c3 commit 9aa907c

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

src/components/PricingAddons/index.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState, useEffect } from "react";
2-
import { Box, Card, CardContent, CardHeader, Typography, FormControl, InputLabel, Select, MenuItem, Slider, Switch, FormControlLabel, Chip, Container, Paper, SistentThemeProvider, CssBaseline
2+
import { Box, Card, CardContent, CardHeader, Typography, FormControl, InputLabel, Select, MenuItem, Slider, Switch, FormControlLabel, Chip, Container, Paper, SistentThemeProvider, CssBaseline, CustomTooltip
33
} from "@sistent/sistent";
44
import { Calculate, CloudOutlined, Group, CheckCircle } from "@mui/icons-material";
55
import AcademyIcon from "./AcademyIcon";
@@ -244,8 +244,21 @@ export const PricingAddons = ({ isYearly = false }) => {
244244
max={learnerOptions.length - 1}
245245
step={null}
246246
marks={learnerOptions.map((option, index) => ({
247-
value: index,
248-
label: option.learners === 1000 ? "1,000+" : option.learners,
247+
value: index,
248+
label: (
249+
<CustomTooltip
250+
title={formatPrice(
251+
(isYearly
252+
? option.monthlyPerUser * 12 * 0.85
253+
: option.monthlyPerUser
254+
) * option.learners
255+
)}
256+
arrow
257+
placement="top"
258+
>
259+
<span>{option.learners === 1000 ? "1,000+" : option.learners}</span>
260+
</CustomTooltip>
261+
),
249262
}))}
250263
/>
251264
<Box sx={{ display: "flex", justifyContent: "space-between" }}>

0 commit comments

Comments
 (0)