0.0.4 • Published 4 years ago

blockkit v0.0.4

Weekly downloads
3
License
GPL-3.0-or-later
Repository
github
Last release
4 years ago

blockkit

This is an exploratory repository to explore the options for creating a wrapper of the wordpress registerBlockType function to add defaults

Idea

The Idea behind this exploration is to create a wrapper around the registerBlockType function. Under the namespace blockkit you can add options to the supports object. Tho start with I will explore to add settings for colors that will then automatically add the attributes and Inspector / Toolbar settings.

import { registerBlock } from 'blockkit';

registerBlock( 'blockkit/block', {
    ...,
    supports: {
        blockkit: {
            colors: [
                'background'
                'text'
            ]
        }
    },
    ...
} );

Example

An example of how to use this can be found in the example directory.