Skip to content

Commit b672f8d

Browse files
committed
update pricingdisplay, add FAQ, clean
1 parent 6c849d7 commit b672f8d

File tree

4 files changed

+88
-33
lines changed

4 files changed

+88
-33
lines changed

docs/src/components/pricing/InfoPrioritySupport.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function InfoPrioritySupport(props: {
2424
color: 'text.secondary',
2525
fontWeight: 'normal',
2626
display: 'block',
27-
mt: 0.8,
27+
mt: 0.4,
2828
textAlign: 'center',
2929
}}
3030
>
@@ -42,7 +42,7 @@ export default function InfoPrioritySupport(props: {
4242
color: 'text.secondary',
4343
fontWeight: 'normal',
4444
display: 'block',
45-
mt: 0.8,
45+
mt: 0.4,
4646
textAlign: 'center',
4747
}}
4848
>

docs/src/components/pricing/PricingFAQ.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,22 @@ const faqData = [
180180
</React.Fragment>
181181
),
182182
},
183+
{
184+
summary: 'What is the validity of the priority support add-on?',
185+
detail: (
186+
<React.Fragment>
187+
The priority support add-on is valid for 1 year from the date of purchase. It is same for
188+
perpetual or annual license model.{' '}
189+
<Link
190+
target="_blank"
191+
rel="noopener"
192+
href="https://mui.com/legal/technical-support-sla/#support-plans"
193+
>
194+
Support plans.
195+
</Link>
196+
</React.Fragment>
197+
),
198+
},
183199
];
184200

185201
const Accordion = styled(MuiAccordion)(({ theme }) => ({
@@ -265,12 +281,13 @@ export default function PricingFAQ() {
265281
{renderItem(1)}
266282
{renderItem(2)}
267283
{renderItem(3)}
284+
{renderItem(4)}
268285
</Grid>
269286
<Grid size={{ xs: 12, md: 4 }}>
270-
{renderItem(4)}
271287
{renderItem(5)}
272288
{renderItem(6)}
273289
{renderItem(7)}
290+
{renderItem(8)}
274291
</Grid>
275292
<Grid size={{ xs: 12, md: 4 }}>
276293
<Paper

docs/src/components/pricing/PricingTable.tsx

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import BusinessIcon from '@mui/icons-material/Business';
2020
import SupportAgentIcon from '@mui/icons-material/SupportAgent';
2121
import PrioritySupportSwitch from 'docs/src/components/pricing/PrioritySupportSwitch';
2222
import InfoPrioritySupport from 'docs/src/components/pricing/InfoPrioritySupport';
23+
import { usePrioritySupport } from 'docs/src/components/pricing/PrioritySupportContext';
2324

2425
const planInfo = {
2526
community: {
@@ -107,14 +108,16 @@ export function PlanPrice(props: PlanPriceProps) {
107108
const annual = licenseModel === 'annual';
108109
const planPriceMinHeight = 24;
109110

111+
const { prioritySupport } = usePrioritySupport();
112+
110113
if (plan === 'community') {
111114
return (
112115
<React.Fragment>
113-
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', mt: 1, mb: 4 }}>
116+
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', mt: 7 }}>
114117
<Typography
115118
variant="h3"
116119
component="div"
117-
sx={{ fontWeight: 'bold', color: 'success.600', mt: 6 }}
120+
sx={{ fontWeight: 'bold', color: 'success.600' }}
118121
>
119122
$0
120123
</Typography>
@@ -185,11 +188,27 @@ export function PlanPrice(props: PlanPriceProps) {
185188
const premiumPerpetualValue = premiumAnnualValue * 3;
186189
const premiumMonthlyValueForAnnual = premiumAnnualValue / 12;
187190

188-
const premiumDisplayedValue = annual ? premiumAnnualValue : premiumPerpetualValue;
191+
const premiumAnnualValueWithPrioritySupport = premiumAnnualValue + 399;
192+
const premiumPerpetualValueWithPrioritySupport = premiumPerpetualValue + 399;
193+
const premiumMonthlyValueForAnnualWithPrioritySupport = 82; // premiumAnnualValueWithPrioritySupport / 12;
194+
189195
const priceExplanation = getPriceExplanation(
190-
annual ? premiumMonthlyValueForAnnual : premiumPerpetualValue,
196+
prioritySupport
197+
? premiumMonthlyValueForAnnualWithPrioritySupport
198+
: premiumMonthlyValueForAnnual,
191199
);
192200

201+
let premiumDisplayedValue: number = premiumAnnualValue;
202+
if (annual && prioritySupport) {
203+
premiumDisplayedValue = premiumAnnualValueWithPrioritySupport;
204+
} else if (!annual && prioritySupport) {
205+
premiumDisplayedValue = premiumPerpetualValueWithPrioritySupport;
206+
} else if (annual && !prioritySupport) {
207+
premiumDisplayedValue = premiumAnnualValue;
208+
} else if (!annual && !prioritySupport) {
209+
premiumDisplayedValue = premiumPerpetualValue;
210+
}
211+
193212
return (
194213
<React.Fragment>
195214
<LicenseModelSwitch />
@@ -246,27 +265,14 @@ export function PlanPrice(props: PlanPriceProps) {
246265
alignItems: 'center',
247266
flexDirection: 'column',
248267
justifyContent: 'center',
249-
mt: 3,
250-
mb: 1,
268+
mt: 4,
251269
}}
252270
>
253271
<BusinessIcon sx={{ fontSize: 65, color: 'text.tertiary' }} />
254272
</Box>
255273
<Typography variant="body2" sx={{ color: 'text.secondary', textAlign: 'center' }}>
256274
Custom pricing
257275
</Typography>
258-
<Box
259-
sx={{
260-
mt: 6,
261-
}}
262-
>
263-
<Typography
264-
variant="body1"
265-
sx={{ color: 'text.secondary', textAlign: 'center', fontSize: '0.875rem' }}
266-
>
267-
+ Priority support included
268-
</Typography>
269-
</Box>
270276
</React.Fragment>
271277
);
272278
}
@@ -781,6 +787,14 @@ const rowHeaders: Record<string, React.ReactNode> = {
781787
}}
782788
/>
783789
),
790+
'customer-success': (
791+
<ColumnHead
792+
{...{
793+
label: 'Customer success manager',
794+
tooltip: 'A dedicated person to help you get the most out of MUI products.',
795+
}}
796+
/>
797+
),
784798
};
785799

786800
const yes = <IconImage name="pricing/yes" title="Included" />;
@@ -902,6 +916,7 @@ const communityData: Record<string, React.ReactNode> = {
902916
'pre-screening': no,
903917
'issue-escalation': no,
904918
'security-questionnaire': no,
919+
'customer-success': no,
905920
};
906921

907922
const proData: Record<string, React.ReactNode> = {
@@ -1007,6 +1022,7 @@ const proData: Record<string, React.ReactNode> = {
10071022
'pre-screening': no,
10081023
'issue-escalation': no,
10091024
'security-questionnaire': <Info value="Available from 10+ devs" />,
1025+
'customer-success': no,
10101026
};
10111027

10121028
const premiumData: Record<string, React.ReactNode> = {
@@ -1107,10 +1123,11 @@ const premiumData: Record<string, React.ReactNode> = {
11071123
'priority-support': <PrioritySupportSwitch />,
11081124
'tech-advisory': pending,
11091125
'support-duration': <Info value="1 year" />,
1110-
'response-time': <InfoPrioritySupport value={yes} metadata="24 hours" value2="48 hours" />,
1126+
'response-time': <InfoPrioritySupport value={yes} metadata="24 hours" value2={no} />,
11111127
'pre-screening': <InfoPrioritySupport value={yes} metadata="4 hours" value2={no} />,
11121128
'issue-escalation': <InfoPrioritySupport value={yes} value2={no} />,
11131129
'security-questionnaire': <Info value="Available from 4+ devs" />,
1130+
'customer-success': no,
11141131
};
11151132

11161133
const enterpriseData: Record<string, React.ReactNode> = {
@@ -1211,10 +1228,11 @@ const enterpriseData: Record<string, React.ReactNode> = {
12111228
'priority-support': <Info value="Included" />,
12121229
'tech-advisory': pending,
12131230
'support-duration': <Info value="1 year" />,
1214-
'response-time': <Info value={yes} metadata={<React.Fragment>24 hours</React.Fragment>} />,
1231+
'response-time': <Info value={yes} metadata="24 hours" />,
12151232
'pre-screening': <Info value={yes} metadata="4 hours" />,
12161233
'issue-escalation': <Info value={yes} />,
12171234
'security-questionnaire': <Info value="Available from 4+ devs" />,
1235+
'customer-success': yes,
12181236
};
12191237

12201238
function RowCategory(props: BoxProps) {
@@ -1918,6 +1936,8 @@ export default function PricingTable({
19181936
{divider}
19191937
{renderRow('issue-escalation')}
19201938
{divider}
1939+
{renderRow('customer-success')}
1940+
{divider}
19211941
{renderRow('security-questionnaire')}
19221942
{divider}
19231943
</Box>

docs/src/components/pricing/PrioritySupportSwitch.tsx

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,48 @@ import Switch from '@mui/material/Switch';
33
import FormGroup from '@mui/material/FormGroup';
44
import FormControlLabel from '@mui/material/FormControlLabel';
55
import Typography from '@mui/material/Typography';
6-
import Box from '@mui/material/Box';
76
import { usePrioritySupport } from 'docs/src/components/pricing/PrioritySupportContext';
7+
import Tooltip from '@mui/material/Tooltip';
88

99
export default function PrioritySupportSwitch() {
1010
const { prioritySupport, setPrioritySupport } = usePrioritySupport();
1111
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
1212
setPrioritySupport(event.target.checked);
1313
};
14+
const prioritySupportDescription =
15+
'At $399/year/dev, get the highest level of support with a 24h SLA response time, pre-screening and issue escalation.';
16+
17+
const tooltipProps = {
18+
enterDelay: 400,
19+
enterNextDelay: 50,
20+
enterTouchDelay: 500,
21+
placement: 'top' as 'top',
22+
describeChild: true,
23+
slotProps: {
24+
tooltip: {
25+
sx: {
26+
fontSize: 12,
27+
},
28+
},
29+
},
30+
};
1431

1532
return (
1633
<FormGroup>
1734
<FormControlLabel
1835
control={<Switch checked={prioritySupport} onChange={handleChange} />}
1936
label={
20-
<Typography
21-
variant="body1"
22-
sx={{ color: 'text.secondary', textAlign: 'center', fontSize: '0.875rem' }}
23-
>
24-
Add priority support <Box component="span" sx={{ display: ['none', 'block'] }} />
25-
at $399/year/dev
26-
</Typography>
37+
<Tooltip title={prioritySupportDescription} {...tooltipProps}>
38+
<Typography
39+
variant="body1"
40+
sx={{ color: 'text.secondary', textAlign: 'center', fontSize: '0.875rem' }}
41+
>
42+
Priority support
43+
</Typography>
44+
</Tooltip>
2745
}
28-
sx={{ mr: 0 }}
29-
labelPlacement="bottom"
46+
sx={{ mb: 0.5, ml: 1, gap: 1, justifyContent: 'center' }}
47+
labelPlacement="end"
3048
/>
3149
</FormGroup>
3250
);

0 commit comments

Comments
 (0)