shopware/frontends - helpers
Welcome to @shopware-pwa/helpers-next
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-pwa/helpers-next";
export default defineConfig({
safelist: helpersCssClasses,
});
Changelog
Full changelog for stable version is available here
Latest changes: 0.0.0-canary-20240719161527
Patch Changes
-
#1074 b688163
Thanks @mkucmus! - Removed optional chaining for translated properties. Expecting a different argument type for the getLanguageName
and getShippingMethodDeliveryTime
methods.
-
#1089 db7c93f
Thanks @mkucmus! - Migrate eslint config to flat format