generoi/wp-gutenberg-hidden-blocks

Adds a block setting for specifying screen specific visibillity

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 6

Forks: 0

Open Issues: 0

Language:JavaScript

Type:wordpress-plugin

v0.3.0 2021-04-23 23:43 UTC

This package is auto-updated.

Last update: 2024-05-11 15:35:19 UTC


README

Adds a block setting for specifying screen specific visibillity

Screen Recording 2021-04-09 at 13 40 37

Installation

composer require generoi/wp-gutenberg-hidden-blocks

Usage

import { addFilter } from '@wordpress/hooks'
import { mobile, tablet, desktop } from '@wordpress/icons';

addFilter('wp-gutenberg-hidden-blocks.screenSizes', 'theme/screen-sizes', () => {
  return [
    { name: 'mobile', label: 'Mobile', icon: mobile },
    { name: 'tablet', label: 'Tablet', icon: tablet },
    { name: 'desktop', label: 'Desktop', icon: desktop },
  ];
});

Development

Install dependencies

composer install
npm install

Run the tests

npm run test

Build assets

# Minified assets which are to be committed to git
npm run build:production

# Watch for changes and re-compile while developing the plugin
npm run start