diff --git a/packages/@react-spectrum/s2/src/Card.tsx b/packages/@react-spectrum/s2/src/Card.tsx index f4ea01def3a..751388b4b2a 100644 --- a/packages/@react-spectrum/s2/src/Card.tsx +++ b/packages/@react-spectrum/s2/src/Card.tsx @@ -501,7 +501,7 @@ export interface CardPreviewProps extends UnsafeStyles, DOMProps { export const CardPreview = forwardRef(function CardPreview(props: CardPreviewProps, ref: DOMRef) { let {size, isQuiet, isHovered, isFocusVisible, isSelected, isPressed, isCheckboxSelection} = useContext(InternalCardContext); - let {UNSAFE_className, UNSAFE_style} = props; + let {UNSAFE_className = '', UNSAFE_style} = props; let domRef = useDOMRef(ref); return (
) { [props, ref] = useSpectrumContextProps(props, ref, HeadingContext); let domRef = useDOMRef(ref); - let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props; + let {UNSAFE_className = '', UNSAFE_style, styles = '', isHidden, slot, ...otherProps} = props; if (isHidden) { return null; } @@ -57,7 +57,7 @@ export const HeaderContext = createContext, D export const Header = forwardRef(function Header(props: ContentProps, ref: DOMRef) { [props, ref] = useSpectrumContextProps(props, ref, HeaderContext); let domRef = useDOMRef(ref); - let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props; + let {UNSAFE_className = '', UNSAFE_style, styles = '', isHidden, slot, ...otherProps} = props; if (isHidden) { return null; } @@ -77,7 +77,7 @@ export const ContentContext = createContext, export const Content = forwardRef(function Content(props: ContentProps, ref: DOMRef) { [props, ref] = useSpectrumContextProps(props, ref, ContentContext); let domRef = useDOMRef(ref); - let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props; + let {UNSAFE_className = '', UNSAFE_style, styles = '', isHidden, slot, ...otherProps} = props; if (isHidden) { return null; } @@ -96,7 +96,7 @@ export const TextContext = createContext, DOM export const Text = forwardRef(function Text(props: ContentProps, ref: DOMRef) { [props, ref] = useSpectrumContextProps(props, ref, TextContext); let domRef = useDOMRef(ref); - let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, children, ...otherProps} = props; + let {UNSAFE_className = '', UNSAFE_style, styles = '', isHidden, slot, children, ...otherProps} = props; let racContext = useContext(RACTextContext); let isSkeleton = useIsSkeleton(); [children, UNSAFE_style] = useSkeletonText(children, UNSAFE_style); @@ -130,7 +130,7 @@ export const KeyboardContext = createContext, export const Keyboard = forwardRef(function Keyboard(props: ContentProps, ref: DOMRef) { [props, ref] = useSpectrumContextProps(props, ref, KeyboardContext); let domRef = useDOMRef(ref); - let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props; + let {UNSAFE_className = '', UNSAFE_style, styles = '', isHidden, slot, ...otherProps} = props; if (isHidden) { return null; } @@ -149,7 +149,7 @@ export const FooterContext = createContext, D export const Footer = forwardRef(function Footer(props: ContentProps, ref: DOMRef) { [props, ref] = useSpectrumContextProps(props, ref, FooterContext); let domRef = useDOMRef(ref); - let {UNSAFE_className = '', UNSAFE_style, styles, isHidden, slot, ...otherProps} = props; + let {UNSAFE_className = '', UNSAFE_style, styles = '', isHidden, slot, ...otherProps} = props; if (isHidden) { return null; }