import type { GlobalTheme } from '../global'; const getFABTheme = (theme: GlobalTheme) => { const colors = { buttonBackground: theme.colors.primary, buttonPressedBackground: theme.colors.primary, buttonActiveBackground: theme.colors.primary, icon: theme.colors.onDarkGlobalSurface, actionItemBackground: theme.colors.defaultGlobalSurface, actionItemPressedBackground: theme.colors.defaultGlobalSurface, backdropBackground: theme.colors.black, titleText: theme.colors.onDarkGlobalSurface, actionItemText: theme.colors.onDefaultGlobalSurface, }; const sizes = { width: theme.sizes.xxxlarge, height: theme.sizes.xxxlarge, iconContainerWidth: theme.sizes.large, iconContainerHeight: theme.sizes.large, fabPairHeight: theme.sizes.xxxlarge, fabPairIconOnlyWidth: theme.sizes.xxxlarge, }; const fonts = { actionItemText: theme.fonts.neutral.regular, title: theme.fonts.neutral.regular, }; const fontSizes = { actionItemText: theme.fontSizes.large, title: theme.fontSizes.medium, }; const lineHeights = { actionItemText: theme.lineHeights.medium, title: theme.lineHeights.large, icon: theme.lineHeights.large, }; const shadows = { default: theme.shadows.default, }; const space = { actionItemPadding: theme.space.smallMedium, actionItemMargin: theme.space.small, actionItemMarginRight: theme.space.large, actionItemTextPaddingLeft: theme.space.xsmall, buttonMarginTop: theme.space.large, buttonMarginRight: theme.space.large, containerPadding: theme.space.smallMedium, titleMarginHorizontal: theme.space.small, fabPairMarginRight: theme.space.small, }; const radii = { actionItem: theme.radii.rounded, }; return { radii, fonts, fontSizes, colors, sizes, lineHeights, shadows, space, }; }; type GetFABThemeReturnType = ReturnType; export interface FABThemeType extends GetFABThemeReturnType { /** * @deprecated will be removed in v9 * */ fonts: GetFABThemeReturnType['fonts']; /** * @deprecated will be removed in v9 * */ fontSizes: GetFABThemeReturnType['fontSizes']; } export default getFABTheme;