Open bmansell opened 4 years ago
CloseButton uses its size prop to control the Close icon's size. This is a problem because CloseButtonProps extends ButtonProps which defines size as a specific string set so the resulting type is a mix of specific strings or a number.
CloseButton
size
CloseButtonProps
ButtonProps
https://github.com/priceline/design-system/blob/aede4ea27538802e7283c0c7d7e210cf1ca3a0c6/packages/types/types/index.d.ts#L73
We should refactor CloseButton's size prop to be more specific like iconSize so that these types don't have to be collapsed into one.
iconSize
Discussion notes: We can rename size for Icon in IconButton to iconSize, which will be the same prop type as size on the Icon component.
CloseButton
uses itssize
prop to control the Close icon's size. This is a problem becauseCloseButtonProps
extendsButtonProps
which definessize
as a specific string set so the resulting type is a mix of specific strings or a number.https://github.com/priceline/design-system/blob/aede4ea27538802e7283c0c7d7e210cf1ca3a0c6/packages/types/types/index.d.ts#L73
We should refactor
CloseButton
's size prop to be more specific likeiconSize
so that these types don't have to be collapsed into one.