UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

49 lines 2.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getBackTopStyles = void 0; const state_1 = require("../../../../../components/backToTop/types/state"); const borders_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/borders"); const sizes_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/sizes"); const spacings_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/spacings"); const zIndex_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/zIndex"); const breakpoints_1 = require("../../../../../types/breakpoints/breakpoints"); const wireframe_1 = require("../../../utils/wireframe"); const variants_1 = require("./variants"); const BACK_TO_TOP_TOKENS = (COLORS) => ({ container: { ...(0, wireframe_1.transformShadow)(borders_1.RADIUS.radius_250), ...(0, wireframe_1.shadowAfterStyles)(borders_1.RADIUS.radius_250, COLORS.BRAND.color_brand_bg_50, spacings_1.SPACINGS.spacing_50), background_color: COLORS.NEUTRAL.color_neutral_bg_250, border_radius: borders_1.RADIUS.radius_250, padding: spacings_1.SPACINGS.spacing_300, right: spacings_1.SPACINGS.spacing_450, z_index: zIndex_1.Z_INDEX.FLOATING, border: `${borders_1.BORDERS.border_100} solid ${COLORS.NEUTRAL.color_neutral_border_50}`, position: 'fixed', [breakpoints_1.DeviceBreakpointsType.MOBILE]: { right: spacings_1.SPACINGS.spacing_300, }, }, icon: { width: sizes_1.SIZES.size_200, height: sizes_1.SIZES.size_200, color: COLORS.ACCENT.color_accent_default_icon_50, }, }); const getBackTopStyles = (COLORS) => { return { [variants_1.BackToTopVariantsType.DEFAULT]: { [state_1.BackToTopStateType.DEFAULT]: { ...BACK_TO_TOP_TOKENS(COLORS), }, [state_1.BackToTopStateType.HOVER]: { ...BACK_TO_TOP_TOKENS(COLORS), }, [state_1.BackToTopStateType.PRESSED]: { ...BACK_TO_TOP_TOKENS(COLORS), }, }, }; }; exports.getBackTopStyles = getBackTopStyles; //# sourceMappingURL=styles.js.map