Closed mofojed closed 2 days ago
When using an Icon in an IllustratedMessage, we should automatically set the default size to XXL and marginBottom to size-10 if the user has not specified those. Should be able to create a wrapper IllustratedMessage component that checks the Icon children and adds the appropriate props before rendering the children. Alternatively we may be able to simply set the slot prop so that it's an illustration in the Icon, and that may make everything work correctly: https://github.com/adobe/react-spectrum/blob/4a8b24028308831a06a2450e6975b8816406315f/packages/%40react-spectrum/icon/src/Illustration.tsx#L44 https://github.com/adobe/react-spectrum/blob/4a8b24028308831a06a2450e6975b8816406315f/packages/%40react-spectrum/illustratedmessage/src/IllustratedMessage.tsx#L22
Icon
IllustratedMessage
size
XXL
marginBottom
size-10
slot
illustration
When using an
Icon
in anIllustratedMessage
, we should automatically set the defaultsize
toXXL
andmarginBottom
tosize-10
if the user has not specified those. Should be able to create a wrapperIllustratedMessage
component that checks theIcon
children and adds the appropriate props before rendering the children. Alternatively we may be able to simply set theslot
prop so that it's anillustration
in theIcon
, and that may make everything work correctly: https://github.com/adobe/react-spectrum/blob/4a8b24028308831a06a2450e6975b8816406315f/packages/%40react-spectrum/icon/src/Illustration.tsx#L44 https://github.com/adobe/react-spectrum/blob/4a8b24028308831a06a2450e6975b8816406315f/packages/%40react-spectrum/illustratedmessage/src/IllustratedMessage.tsx#L22