Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@blockly/field-grid-dropdown
Advanced tools
A Blockly dropdown field with grid layout.
yarn add @blockly/field-grid-dropdown
npm install @blockly/field-grid-dropdown --save
This field accepts the same parameters as the Blockly.FieldDropdown in Blockly core. The config object bag passed into this field accepts additional optional parameters:
"columns"
to specify the number of columns in the dropdown field (must be an integer greater than 0).
If not provided, the default is 3 columns."primaryColour"
to specify the colour of the dropdown (must be a string CSS colour). If not provided,
the dropdown color will match the primary colour of the parent block."borderColour"
to specify the colour of the border of the dropdown (must be a string CSS colour). If
not provided, the border colour will match the tertiary colour of the parent block.import * as Blockly from 'blockly';
import {FieldGridDropdown} from '@blockly/field-grid-dropdown';
Blockly.Blocks['test_field_grid_dropdown'] = {
init: function () {
this.appendDummyInput()
.appendField('grid dropdown: ')
.appendField(
new FieldGridDropdown([
['A', 'A'],
['B', 'B'],
['C', 'C'],
['D', 'D'],
['E', 'E'],
['F', 'F'],
['G', 'G'],
['H', 'H'],
]),
'FIELDNAME',
);
},
};
import * as Blockly from 'blockly';
import '@blockly/field-grid-dropdown';
Blockly.defineBlocksWithJsonArray([
{
type: 'test_field_grid_dropdown',
message0: 'template: %1',
args0: [
{
type: 'field_grid_dropdown',
name: 'FIELDNAME',
options: [
['A', 'A'],
['B', 'B'],
['C', 'C'],
['D', 'D'],
['E', 'E'],
['F', 'F'],
['G', 'G'],
['H', 'H'],
],
},
],
},
]);
Apache 2.0
FAQs
A Blockly dropdown field with grid layout.
The npm package @blockly/field-grid-dropdown receives a total of 0 weekly downloads. As such, @blockly/field-grid-dropdown popularity was classified as not popular.
We found that @blockly/field-grid-dropdown demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.