Skip to content

Releases: janizde/class-bound-components

v2.0.0 – Functional Modifiers

15 Dec 20:35

Choose a tag to compare

Breaking: Modifiers extend, withVariants, withOptions and as have moved from being members of the components to being pure functions on either the imported classBound object or as named exports from class-bound-components

Example:

// Previously:
import classBound from 'class-bound-component';

const MyComponent = classBound('fooClassName');
const ExtendedComponent = MyComponent.extend('fooClassName');

// From v2.0.0 onwards:
import classBound, { extend } from 'class-bound-components';

const MyComponent = classBound('fooClassName');
const ExtendedComponent = extend(MyComponent, 'fooClassName');

// or alternatively
const ExtendedComponentAlt = classBound.extend(MyComponent, 'fooClassName');

Additional changes:

  • Symbol is not longer required to be present or polyfilled

v1.1.0 – Ref Forwarding ⛓⏩

08 Jul 12:23

Choose a tag to compare

This release mainly adds support for automatic ref forwarding to intrinsic elements and wrapped ForwardRefExoticComponents. Furthermore some more extensive documentation on TypeScript and usage with CSS modules.