({
isV3,
iconWidth,
leadingIcon,
trailingIcon,
}: ContentProps)
| 85 | }; |
| 86 | |
| 87 | export const getContentMaxWidth = ({ |
| 88 | isV3, |
| 89 | iconWidth, |
| 90 | leadingIcon, |
| 91 | trailingIcon, |
| 92 | }: ContentProps) => { |
| 93 | if (isV3) { |
| 94 | if (leadingIcon && trailingIcon) { |
| 95 | return MAX_WIDTH - (2 * iconWidth + 24); |
| 96 | } |
| 97 | |
| 98 | if (leadingIcon || trailingIcon) { |
| 99 | return MAX_WIDTH - (iconWidth + 24); |
| 100 | } |
| 101 | |
| 102 | return MAX_WIDTH - 12; |
| 103 | } |
| 104 | |
| 105 | if (leadingIcon) { |
| 106 | return MAX_WIDTH - (iconWidth + 48); |
| 107 | } |
| 108 | |
| 109 | return MAX_WIDTH - 16; |
| 110 | }; |
no outgoing calls
no test coverage detected
searching dependent graphs…