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:
@@ -52,8 +52,8 @@ export const Default: Story = {
|
||||
Funeral package
|
||||
</Typography>
|
||||
<Typography variant="body1" color="text.secondary">
|
||||
A comprehensive service including chapel ceremony, transport, and
|
||||
preparation. Suitable for families seeking a traditional farewell.
|
||||
A comprehensive service including chapel ceremony, transport, and preparation. Suitable
|
||||
for families seeking a traditional farewell.
|
||||
</Typography>
|
||||
</>
|
||||
),
|
||||
@@ -99,12 +99,7 @@ export const Variants: Story = {
|
||||
export const Interactive: Story = {
|
||||
render: () => (
|
||||
<div style={{ display: 'flex', gap: 24, maxWidth: 800 }}>
|
||||
<Card
|
||||
interactive
|
||||
sx={{ flex: 1 }}
|
||||
tabIndex={0}
|
||||
onClick={() => alert('Card clicked')}
|
||||
>
|
||||
<Card interactive sx={{ flex: 1 }} tabIndex={0} onClick={() => alert('Card clicked')}>
|
||||
<Typography variant="h5" gutterBottom>
|
||||
Elevated + Interactive
|
||||
</Typography>
|
||||
@@ -305,11 +300,15 @@ export const OnDifferentBackgrounds: Story = {
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
<Card variant="elevated">
|
||||
<Typography variant="labelLg">Elevated</Typography>
|
||||
<Typography variant="body2" color="text.secondary">Shadow defines edges</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
Shadow defines edges
|
||||
</Typography>
|
||||
</Card>
|
||||
<Card variant="outlined">
|
||||
<Typography variant="labelLg">Outlined</Typography>
|
||||
<Typography variant="body2" color="text.secondary">Border defines edges</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
Border defines edges
|
||||
</Typography>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
@@ -328,11 +327,15 @@ export const OnDifferentBackgrounds: Story = {
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
<Card variant="elevated">
|
||||
<Typography variant="labelLg">Elevated</Typography>
|
||||
<Typography variant="body2" color="text.secondary">White card + shadow on grey</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
White card + shadow on grey
|
||||
</Typography>
|
||||
</Card>
|
||||
<Card variant="outlined">
|
||||
<Typography variant="labelLg">Outlined</Typography>
|
||||
<Typography variant="body2" color="text.secondary">Contrast + border on grey</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
Contrast + border on grey
|
||||
</Typography>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
@@ -395,8 +398,8 @@ export const PriceCardPreview: Story = {
|
||||
$3,200
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary" sx={{ mb: 3 }}>
|
||||
A respectful and simple service with chapel ceremony, transport, and
|
||||
professional preparation.
|
||||
A respectful and simple service with chapel ceremony, transport, and professional
|
||||
preparation.
|
||||
</Typography>
|
||||
<Button fullWidth size="large">
|
||||
Select this package
|
||||
@@ -432,8 +435,8 @@ export const WithImage: Story = {
|
||||
Parsons Chapel
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
Our heritage-listed chapel seats up to 120 guests and features
|
||||
modern audio-visual facilities.
|
||||
Our heritage-listed chapel seats up to 120 guests and features modern audio-visual
|
||||
facilities.
|
||||
</Typography>
|
||||
</Box>
|
||||
</Card>
|
||||
|
||||
@@ -58,9 +58,7 @@ export const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
||||
const muiVariant = variant === 'outlined' ? 'outlined' : undefined;
|
||||
|
||||
// Interactive cards need keyboard operability
|
||||
const interactiveProps = interactive
|
||||
? { tabIndex: 0 as const, role: 'button' as const }
|
||||
: {};
|
||||
const interactiveProps = interactive ? { tabIndex: 0 as const, role: 'button' as const } : {};
|
||||
|
||||
return (
|
||||
<MuiCard
|
||||
@@ -88,8 +86,7 @@ export const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
||||
// Focus-visible for keyboard accessibility on interactive cards
|
||||
interactive && {
|
||||
'&:focus-visible': {
|
||||
outline: (theme: Theme) =>
|
||||
`2px solid ${theme.palette.primary.main}`,
|
||||
outline: (theme: Theme) => `2px solid ${theme.palette.primary.main}`,
|
||||
outlineOffset: '2px',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user