Fonte
{ "attention_seekers": [ "bounce", "flash", "pulse", "rubberBand", "shake", "headShake", "swing", "tada", "wobble", "jello" ], "bouncing_entrances": [ "bounceIn", "bounceInDown", "bounceInLeft", "bounceInRight", "bounceInUp" ], "fading_entrances": [ "fadeIn", "fadeInDown", "fadeInLeft", "fadeInRight", "fadeInUp" ], "lightspeed": [ "lightSpeedIn" ], "rotating_entrances": [ "rotateIn", "rotateInDownLeft", "rotateInDownRight", "rotateInUpLeft", "rotateInUpRight" ], "specials": [ "rollIn" ], "zooming_entrances": [ "zoomIn", "zoomInDown", "zoomInLeft", "zoomInRight", "zoomInUp" ], "sliding_entrances": [ "slideInDown", "slideInLeft", "slideInRight", "slideInUp" ] }
/** * External dependencies */ import { isFunction } from 'lodash'; import classnames from 'classnames'; import { BaseControl, ButtonGroup, Button } from '@wordpress/components'; import { Component } from '@wordpress/element'; import { withInstanceId } from '@wordpress/compose'; /** * Internal dependencies */ import './style.scss'; class ToggleButtonControl extends Component { constructor() { super( ...arguments ); this.onClick = this.onClick.bind( this ); } onClick( event ) { if ( this.props.onChange ) { this.props.onChange( event.target.value ); } } render() { const { label, checked, instanceId, className, help, options, value, } = this.props; const id = `inspector-toggle-button-control-${ instanceId }`; let helpLabel; if ( help ) { helpLabel = isFunction( help ) ? help( checked ) : help; } return (Fonte