UNPKG

@heyframe/helpers

Version:
44 lines (27 loc) 1.57 kB
# heyframe/frontends - helpers Welcome to `@heyframe/helpers` package. For getting started documentation visit [https://frontends.heyframe.com/](https://frontends.heyframe.com/) Documentation specific for this package: [helpers](https://frontends.heyframe.com/packages/helpers.html) ## Reusable classes The `helpersCssClasses` variable, defined in the `cms/layoutClasses.ts` helper file, comprises an array of class names utilized within the CMS. To enhance type support, a union type `HelpersCssClasses` is defined, which encompasses all class names present in the `helpersCssClasses` array. ```ts const visibilityMap: Record<CmsVisibility, HelpersCssClasses> = { mobile: "max-md:hidden", tablet: "md:max-lg:hidden", desktop: "lg:hidden", }; ``` These classes can be integrated into a custom template, thereby ensuring consistency across different packages. For example as a `safelist` classes in unocss configuration file ```ts import { helpersCssClasses } from "@heyframe/helpers"; export default defineConfig({ safelist: helpersCssClasses, }); ``` <!-- AUTO GENERATED CHANGELOG --> ## Changelog Full changelog for stable version is available [here](https://github.com/heyframe/frontends/blob/main/packages/helpers/CHANGELOG.md) ### Latest changes: 1.5.0 ### Minor Changes - [#1910](https://github.com/heyframe/frontends/pull/1910) [`c8fa438`](https://github.com/heyframe/frontends/commit/c8fa438b38de6dbc43a2895f2d1906907447c384) Thanks [@mdanilowicz](https://github.com/mdanilowicz)! - Add helper for getting payment and shipping method icon