@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
115 lines (106 loc) • 2.76 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"name": "vwc-switch",
"path": "./../node_modules/@vonage/vwc-switch/src/vwc-switch.ts",
"description": "This component is an extension of [<mwc-switch>](https://github.com/material-components/material-components-web-components/tree/master/packages/switch)",
"attributes": [
{
"name": "connotation",
"type": "SwitchConnotation | undefined"
},
{
"name": "enlarged",
"type": "boolean",
"default": "false"
}
],
"properties": [
{
"name": "connotation",
"attribute": "connotation",
"type": "SwitchConnotation | undefined",
"bindable": false
},
{
"name": "enlarged",
"attribute": "enlarged",
"type": "boolean",
"default": "false",
"bindable": false
},
{
"name": "styles",
"type": "CSSResult[]"
},
{
"name": "checked",
"type": "boolean",
"bindable": false
},
{
"name": "disabled",
"type": "boolean",
"bindable": false
},
{
"name": "ariaLabel",
"type": "string | undefined",
"bindable": false
},
{
"name": "ariaLabelledBy",
"type": "string | undefined",
"bindable": false
},
{
"name": "shadowRootOptions",
"type": "ShadowRootInit",
"bindable": false
},
{
"name": "ripple",
"description": "Implement ripple getter for Ripple integration with mwc-formfield",
"type": "Promise<Ripple | null>"
}
],
"events": [
"change"
]
}
*/
import PropTypes from 'prop-types'
import wrapper from '@vonage/vivid-react-wrapper'
import '@vonage/vwc-switch'
/** This component is an extension of [<mwc-switch>](https://github.com/material-components/material-components-web-components/tree/master/packages/switch)
* @param {SwitchConnotation | undefined} connotation attribute: <VwcSwitch connotation />
* @param {boolean} enlarged attribute: <VwcSwitch enlarged />
* @param {boolean} checked
* @param {boolean} disabled
* @param {string | undefined} ariaLabel
* @param {string | undefined} ariaLabelledBy
* @param {ShadowRootInit} shadowRootOptions
*/
const VwcSwitch = wrapper('vwc-switch', {
events: [{"name":"change","propName":"onChange"}],
attributes: [],
properties: []
});
VwcSwitch.propTypes = {
onChange: PropTypes.func,
connotation: PropTypes.any /* SwitchConnotation | undefined *//* attribute: connotation */,
enlarged: PropTypes.bool/* default: false *//* attribute: enlarged */,
checked: PropTypes.bool,
disabled: PropTypes.bool,
ariaLabel: PropTypes.string,
ariaLabelledBy: PropTypes.string,
shadowRootOptions: PropTypes.any /* ShadowRootInit */
}
VwcSwitch.defaultProps = {
enlarged: false
}
VwcSwitch.displayName = 'VwcSwitch'
export default VwcSwitch