1.4.0 • Published 5 months ago

@shopware/helpers v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

shopware/frontends - helpers

Welcome to @shopware/helpers package.

For getting started documentation visit https://frontends.shopware.com/

Documentation specific for this package: helpers

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.

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

import { helpersCssClasses } from "@shopware/helpers";

export default defineConfig({
  safelist: helpersCssClasses,
});

Changelog

Full changelog for stable version is available here

Latest changes: 1.4.0

Minor Changes

  • #1602 bb7d1cb Thanks @patzick! - Switch from @shopware-pwa/helpers-next to @shopware/helpers package.

  • #1602 bb7d1cb Thanks @patzick! - Switch from @shopware-pwa/cms-base to @shopware/cms-base-layer package.