UNPKG

@chief-editor/brick-control

Version:

Control Brick for chief editor

1 lines 597 B
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,a=1,i=arguments.length;a<i;a++)for(var r in e=arguments[a])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};import React from"react";import{Switch}from"@chief-editor/ui";export function SwitchBrick(t){var e=t.config.props,a=e.disabled,i=void 0!==a&&a,r=e.readonly,n=void 0!==r&&r,s=t.styles,o=t.setValue,c=t.layout,l=t.value,d=t.creator;return React.createElement(Switch,{"data-id":d,style:__assign(__assign({},c),s),checked:l,disabled:i||n,onValueChange:o})}