Add selected prop to ProviderCard

Thread Card's selected state (brand border + warm bg) through
ProviderCard for the radiogroup selection pattern in ProvidersStep.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 14:29:53 +11:00
parent f4cf8fe69f
commit 9e10a5e0f1

View File

@@ -37,6 +37,8 @@ export interface ProviderCardProps {
capabilityDescription?: string; capabilityDescription?: string;
/** Starting price in dollars (shown as "From $X") */ /** Starting price in dollars (shown as "From $X") */
startingPrice?: number; startingPrice?: number;
/** Whether this card is the currently selected provider */
selected?: boolean;
/** Click handler — entire card is clickable */ /** Click handler — entire card is clickable */
onClick?: () => void; onClick?: () => void;
/** MUI sx prop for style overrides */ /** MUI sx prop for style overrides */
@@ -96,6 +98,7 @@ export const ProviderCard = React.forwardRef<HTMLDivElement, ProviderCardProps>(
capabilityLabel, capabilityLabel,
capabilityColor = 'default', capabilityColor = 'default',
capabilityDescription, capabilityDescription,
selected = false,
startingPrice, startingPrice,
onClick, onClick,
sx, sx,
@@ -109,6 +112,7 @@ export const ProviderCard = React.forwardRef<HTMLDivElement, ProviderCardProps>(
<Card <Card
ref={ref} ref={ref}
interactive interactive
selected={selected}
padding="none" padding="none"
onClick={onClick} onClick={onClick}
sx={[ sx={[