@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
155 lines (146 loc) • 4 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"name": "vwc-badge",
"path": "./../node_modules/@vonage/vwc-badge/src/vwc-badge.ts",
"description": "Represents a badge custom element.\nbadge is a label that holds small amounts of information. A badge can be used to display unread notifications, or to label a block of text. Badges don’t work for navigation because they can't include a hyperlink.",
"attributes": [
{
"name": "connotation",
"type": "BadgeConnotation | undefined"
},
{
"name": "shape",
"type": "BadgeShape | undefined"
},
{
"name": "layout",
"type": "BadgeLayout | undefined"
},
{
"name": "dense",
"type": "boolean",
"default": "false"
},
{
"name": "enlarged",
"type": "boolean",
"default": "false"
},
{
"name": "text",
"type": "string | undefined"
},
{
"name": "icon",
"type": "string | undefined"
},
{
"name": "iconTrailing",
"type": "string | undefined"
}
],
"properties": [
{
"name": "styles",
"type": "CSSResult",
"default": "\"style\""
},
{
"name": "connotation",
"attribute": "connotation",
"type": "BadgeConnotation | undefined",
"bindable": false
},
{
"name": "shape",
"attribute": "shape",
"type": "BadgeShape | undefined",
"bindable": false
},
{
"name": "layout",
"attribute": "layout",
"type": "BadgeLayout | undefined",
"bindable": false
},
{
"name": "dense",
"attribute": "dense",
"type": "boolean",
"default": "false",
"bindable": false
},
{
"name": "enlarged",
"attribute": "enlarged",
"type": "boolean",
"default": "false",
"bindable": false
},
{
"name": "text",
"attribute": "text",
"type": "string | undefined",
"bindable": false
},
{
"name": "icon",
"attribute": "icon",
"type": "string | undefined",
"bindable": false
},
{
"name": "iconTrailing",
"attribute": "iconTrailing",
"type": "string | undefined",
"bindable": false
}
],
"slots": [
{
"name": "",
"description": "This is a default/unnamed slot to assign text content. *deprecated* please use _text_ property instead"
}
],
"events": []
}
*/
import PropTypes from 'prop-types'
import wrapper from '@vonage/vivid-react-wrapper'
import '@vonage/vwc-badge'
/** Represents a badge custom element.
badge is a label that holds small amounts of information. A badge can be used to display unread notifications, or to label a block of text. Badges don’t work for navigation because they can't include a hyperlink.
* @param {BadgeConnotation | undefined} connotation attribute: <VwcBadge connotation />
* @param {BadgeShape | undefined} shape attribute: <VwcBadge shape />
* @param {BadgeLayout | undefined} layout attribute: <VwcBadge layout />
* @param {boolean} dense attribute: <VwcBadge dense />
* @param {boolean} enlarged attribute: <VwcBadge enlarged />
* @param {string | undefined} text attribute: <VwcBadge text />
* @param {string | undefined} icon attribute: <VwcBadge icon />
* @param {string | undefined} iconTrailing attribute: <VwcBadge iconTrailing />
*/
const VwcBadge = wrapper('vwc-badge', {
events: [],
attributes: [],
properties: []
});
VwcBadge.propTypes = {
connotation: PropTypes.any /* BadgeConnotation | undefined *//* attribute: connotation */,
shape: PropTypes.any /* BadgeShape | undefined *//* attribute: shape */,
layout: PropTypes.any /* BadgeLayout | undefined *//* attribute: layout */,
dense: PropTypes.bool/* default: false *//* attribute: dense */,
enlarged: PropTypes.bool/* default: false *//* attribute: enlarged */,
text: PropTypes.string/* attribute: text */,
icon: PropTypes.string/* attribute: icon */,
iconTrailing: PropTypes.string/* attribute: iconTrailing */
}
VwcBadge.defaultProps = {
dense: false,
enlarged: false
}
VwcBadge.displayName = 'VwcBadge'
export default VwcBadge