Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Latest commit

 

History

History
36 lines (23 loc) · 1.48 KB

MIGRATION.md

File metadata and controls

36 lines (23 loc) · 1.48 KB

Migration Guide

Migrating from v3 to v4

Updated dependencies

The dependencies for this component have all been updated to the latest major versions. If you have any conflicts while installing this version, you'll need to first update its dependencies. See the Bower config for these.

JavaScript

o-gallery v4 uses ES Modules over CommonJS syntax.

-const Gallery = require('o-gallery');
+import Gallery from 'o-gallery';

However to continue using the CommonJS syntax, without a plugin like babel-plugin-transform-es2015-modules-commonjs, add .default.

-const Gallery = require('o-gallery');
+const Gallery = require('o-gallery').default;

Sass Mixins

The oGallery mixin now outputs all o-gallery styles. All other o-gallery mixins have been removed. Instead include oGallery once and use default o-gallery css classes.

Colour Usecases

All o-gallery colour usecases have been removed. Use o-colors directly.

Migrating from v2 to v3

This update introduces the new major of o-colors. Updating to this new version will mean updating any other components that you have which are using o-colors. There are no other breaking changes in this release.