({
size,
theme,
customSize,
}: {
customSize?: number;
size: 'small' | 'medium' | 'large';
theme: InternalTheme;
})
| 377 | }); |
| 378 | |
| 379 | export const getFabStyle = ({ |
| 380 | size, |
| 381 | theme, |
| 382 | customSize, |
| 383 | }: { |
| 384 | customSize?: number; |
| 385 | size: 'small' | 'medium' | 'large'; |
| 386 | theme: InternalTheme; |
| 387 | }) => { |
| 388 | const { isV3, roundness } = theme; |
| 389 | |
| 390 | if (customSize) return getCustomFabSize(customSize, roundness); |
| 391 | |
| 392 | if (isV3) { |
| 393 | switch (size) { |
| 394 | case 'small': |
| 395 | return { ...v3SmallSize, borderRadius: 3 * roundness }; |
| 396 | case 'medium': |
| 397 | return { ...v3MediumSize, borderRadius: 4 * roundness }; |
| 398 | case 'large': |
| 399 | return { ...v3LargeSize, borderRadius: 7 * roundness }; |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | if (size === 'small') { |
| 404 | return smallSize; |
| 405 | } |
| 406 | return standardSize; |
| 407 | }; |
| 408 | |
| 409 | const extended = { |
| 410 | height: 48, |
no test coverage detected
searching dependent graphs…