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

60 lines 2.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getButtonStyles = void 0; const state_1 = require("../../../../../components/button/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 typography_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/typography"); const wireframe_1 = require("../../../utils/wireframe"); const variants_1 = require("./variants"); const commonPropsDefault = { icon_size: sizes_1.SIZES.size_200, label_font_weight: typography_1.FONT_WEIGHT.font_weight_600, radius_size: borders_1.BORDERS.border_00, }; const BUTTON_COMMON_TOKENS = (COLORS) => ({ ...commonPropsDefault, altVariant: true, background_color: COLORS.NEUTRAL.color_neutral_bg_250, color: COLORS.ACCENT.color_accent_default_font_50, icon: { color: COLORS.ACCENT.color_accent_default_font_50, }, border_width: borders_1.BORDERS.border_50, border_style: 'solid', border_color: COLORS.SECONDARY.color_secondary_border_50, ...(0, wireframe_1.transformShadow)(borders_1.RADIUS.radius_300), ...(0, wireframe_1.shadowAfterStyles)(borders_1.RADIUS.radius_300, COLORS.BRAND.color_brand_bg_50, spacings_1.SPACINGS.spacing_50), }); const getButtonStyles = (COLORS) => { return { [variants_1.ButtonSizeType.LARGE]: { padding: `${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_300}`, icon: { height: sizes_1.SIZES.size_300, width: sizes_1.SIZES.size_300, }, }, [variants_1.ButtonSizeType.MEDIUM]: { padding: `${spacings_1.SPACINGS.spacing_200} ${spacings_1.SPACINGS.spacing_300}`, icon: { height: sizes_1.SIZES.size_300, width: sizes_1.SIZES.size_300, }, }, [variants_1.ButtonVariantType.PRIMARY]: { [state_1.ButtonStateType.DEFAULT]: { ...BUTTON_COMMON_TOKENS(COLORS), }, [state_1.ButtonStateType.PRESSED]: { ...BUTTON_COMMON_TOKENS(COLORS), }, [state_1.ButtonStateType.HOVER]: { ...BUTTON_COMMON_TOKENS(COLORS), }, }, }; }; exports.getButtonStyles = getButtonStyles; //# sourceMappingURL=styles.js.map