Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 431 Bytes

blockcomponent.md

File metadata and controls

18 lines (13 loc) · 431 Bytes

BlockComponent

BlockComponent works the same as ItemComponent but for block components. Decorate any custom block component class that exposes a static componentId.

Example

import { BlockComponent } from '@bedrock-oss/stylish';

@BlockComponent
class ShapeComponent {
  static componentId = 'example:shape';
}

Decorated classes will be registered with the BlockComponentRegistry when init() executes.