format: Apply Prettier to existing codebase

Formatting-only changes across all component and story files.
No logic or behaviour changes — only whitespace, line breaks, and trailing commas.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 16:42:16 +11:00
parent aa7cdeecf0
commit 047d913960
46 changed files with 1510 additions and 886 deletions

View File

@@ -150,7 +150,8 @@ export const ServiceAddOns: Story = {
export const WithoutPrice: Story = {
args: {
name: 'Order of service booklet',
description: 'Complimentary printed booklet with the service programme and a photo of your loved one.',
description:
'Complimentary printed booklet with the service programme and a photo of your loved one.',
},
};
@@ -160,13 +161,7 @@ export const WithoutPrice: Story = {
export const WithoutDescription: Story = {
render: function Render() {
const [checked, setChecked] = React.useState(false);
return (
<AddOnOption
name="Include GST in pricing"
checked={checked}
onChange={setChecked}
/>
);
return <AddOnOption name="Include GST in pricing" checked={checked} onChange={setChecked} />;
},
};
@@ -176,7 +171,8 @@ export const WithoutDescription: Story = {
export const Disabled: Story = {
args: {
name: 'Catering',
description: 'Not available at this venue. Please contact the venue directly for catering options.',
description:
'Not available at this venue. Please contact the venue directly for catering options.',
price: 1200,
disabled: true,
},

View File

@@ -54,7 +54,19 @@ export interface AddOnOptionProps {
* ```
*/
export const AddOnOption = React.forwardRef<HTMLDivElement, AddOnOptionProps>(
({ name, description, price, checked = false, onChange, disabled = false, maxDescriptionLines, sx }, ref) => {
(
{
name,
description,
price,
checked = false,
onChange,
disabled = false,
maxDescriptionLines,
sx,
},
ref,
) => {
const switchId = React.useId();
const [expanded, setExpanded] = React.useState(false);
const [isClamped, setIsClamped] = React.useState(false);
@@ -129,10 +141,7 @@ export const AddOnOption = React.forwardRef<HTMLDivElement, AddOnOptionProps>(
{/* Price — tucks directly under heading */}
{price != null && (
<Typography
variant="body2"
color="text.secondary"
>
<Typography variant="body2" color="text.secondary">
${price.toLocaleString('en-AU')}
</Typography>
)}
@@ -146,12 +155,13 @@ export const AddOnOption = React.forwardRef<HTMLDivElement, AddOnOptionProps>(
color="text.secondary"
sx={{
mt: 0.5,
...(maxDescriptionLines && !expanded && {
display: '-webkit-box',
WebkitLineClamp: maxDescriptionLines,
WebkitBoxOrient: 'vertical',
overflow: 'hidden',
}),
...(maxDescriptionLines &&
!expanded && {
display: '-webkit-box',
WebkitLineClamp: maxDescriptionLines,
WebkitBoxOrient: 'vertical',
overflow: 'hidden',
}),
}}
>
{description}