carbon-custom-elements
Version:
A Carbon Design System variant that's as easy to use as native HTML elements, with no framework tax, no framework silo.
28 lines (27 loc) • 921 B
JavaScript
/**
* @license
*
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
export * from '../../components/toggle/toggle';
import { descriptor as parentDescriptor } from '../checkbox/checkbox';
export { default as CustomElement } from '../../components/toggle/toggle';
import createReactCustomElementType from '../../globals/wrappers/createReactCustomElementType';
import settings from 'carbon-components/es/globals/js/settings';
var prefix = settings.prefix;
export var descriptor = Object.assign({}, parentDescriptor, {
checkedText: {
attribute: 'checked-text',
},
size: {},
uncheckedText: {
attribute: 'unchecked-text',
},
onChange: {
event: ''.concat(prefix, '-toggle-changed'),
},
});
export default createReactCustomElementType(''.concat(prefix, '-toggle'), descriptor);