Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return Children.map(children, (child, index) => {
if (matchComponentTypes(child, [GridCol])) {
return safeCloneElement(child, {
...pickProps(this.props, GridRow.propTypes),
...child.props, /* child props should override parent */
isLastRow: props.isLastRow,
isLastCol: ((index + 1) === Children.count(children))
})
} else {
return child // PropType validation should handle errors
}
})
}
get styleProps () {
const { cursor, style } = this.props // eslint-disable-line react/prop-types
const whitelisted = pickProps(style || {}, {}, [
// Position/calculateElementPosition:
'top',
'left',
'position',
'display',
'transform',
'overflow',
'minWidth',
'minHeight',
// Img:
'filter',
// Flex.Item:
'flexBasis',
// Avatar:
'backgroundImage'
])
get styleProps () {
const { cursor, style } = this.props // eslint-disable-line react/prop-types
const whitelisted = pickProps(style || {}, {}, [
// Position/calculateElementPosition:
'top',
'left',
'position',
'display',
'transform',
'overflow',
'minWidth',
'minHeight',
// Img:
'filter',
// Flex.Item:
'flexBasis',
// Avatar:
'backgroundImage'
])
render() {
return (
)
}
}
[styles.disabled]: disabled
}
const style = width ? { width } : null
let descriptionIds = ''
if (props['aria-describedby']) {
descriptionIds = `${props['aria-describedby'] }`
}
if (this.hasMessages) {
descriptionIds += this._messagesId
}
return (
<span>
</span>
renderTransition (content) {
return (
{content}
)
}
render () {
return (
{this.renderFields()}
)
}
}
return (
{ this.elementType === 'fieldset' && this.renderLegend() }
{ this.renderLabel() }
{ this.props.children }
{ this.renderVisibleMessages() }
)
}
}
render () {
let content = (
<dialog open="{this.state.open}">
{this.props.children}
</dialog>
)
if (this.props.transition) {
content = this.renderTransition(content)
}
return (
render () {
const {
trigger,
disabled
} = this.props
return trigger ? (
{
this._popover = el
if (typeof this.props.popoverRef === 'function') {
this.props.popoverRef(el)
}
}}
>
{safeCloneElement(trigger, {
ref: (el) => {
this._trigger = el