Fix AddOnOption alignment + quieten "View more" link

- Centre-align heading row so switch aligns with short headings (Flowers edge case)
- Remove margin between heading and price — tucks directly underneath
- "View more" link: caption size + text.secondary colour + weight 400 (both components)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 21:25:20 +11:00
parent 274671fdc6
commit f6b51ae7d4
2 changed files with 7 additions and 8 deletions

View File

@@ -99,11 +99,11 @@ export const AddOnOption = React.forwardRef<HTMLDivElement, AddOnOptionProps>(
...(Array.isArray(sx) ? sx : [sx]), ...(Array.isArray(sx) ? sx : [sx]),
]} ]}
> >
{/* Top row: name + switch pinned top-right */} {/* Top row: name + switch */}
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',
alignItems: 'flex-start', alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
gap: 2, gap: 2,
}} }}
@@ -127,12 +127,11 @@ export const AddOnOption = React.forwardRef<HTMLDivElement, AddOnOptionProps>(
/> />
</Box> </Box>
{/* Price — own row below heading */} {/* Price — tucks directly under heading */}
{price != null && ( {price != null && (
<Typography <Typography
variant="body2" variant="body2"
color="text.secondary" color="text.secondary"
sx={{ mt: 0.5 }}
> >
${price.toLocaleString('en-AU')} ${price.toLocaleString('en-AU')}
</Typography> </Typography>
@@ -160,12 +159,12 @@ export const AddOnOption = React.forwardRef<HTMLDivElement, AddOnOptionProps>(
{maxDescriptionLines && isClamped && ( {maxDescriptionLines && isClamped && (
<Link <Link
component="button" component="button"
variant="body2" variant="caption"
onClick={(e: React.MouseEvent) => { onClick={(e: React.MouseEvent) => {
e.stopPropagation(); e.stopPropagation();
setExpanded((prev) => !prev); setExpanded((prev) => !prev);
}} }}
sx={{ mt: 0.5, fontSize: 'inherit' }} sx={{ mt: 0.5, color: 'text.secondary', fontWeight: 400 }}
> >
{expanded ? 'View less' : 'View more'} {expanded ? 'View less' : 'View more'}
</Link> </Link>

View File

@@ -136,12 +136,12 @@ export const ServiceOption = React.forwardRef<HTMLDivElement, ServiceOptionProps
{maxDescriptionLines && isClamped && ( {maxDescriptionLines && isClamped && (
<Link <Link
component="button" component="button"
variant="body2" variant="caption"
onClick={(e: React.MouseEvent) => { onClick={(e: React.MouseEvent) => {
e.stopPropagation(); e.stopPropagation();
setExpanded((prev) => !prev); setExpanded((prev) => !prev);
}} }}
sx={{ mt: 0.5, fontSize: 'inherit' }} sx={{ mt: 0.5, color: 'text.secondary', fontWeight: 400 }}
> >
{expanded ? 'View less' : 'View more'} {expanded ? 'View less' : 'View more'}
</Link> </Link>