Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render () {
const ElementType = getElementType(Dialog, this.props)
return this.props.open ? (
{this.props.children}
) : null
}
}
maxWidth,
maxHeight,
overflowX,
overflowY,
stacking,
shadow,
position,
focusPosition,
focusColor,
shouldAnimateFocus,
borderColor,
size, // eslint-disable-line react/prop-types
className // eslint-disable-line react/prop-types
} = this.props
const ElementType = getElementType(View, this.props)
const focusOutlineClasses = position === 'relative' ? {
[styles[this.focusRingRadius]]: true,
[styles[`focusPosition--${focusPosition}`]]: true,
[styles[`focusColor--${focusColor}`]]: true,
[styles[`focusAnimation`]]: shouldAnimateFocus
} : {}
const classes = classnames({
[styles.root]: true,
[styles.debug]: debug,
[styles.hasBorder]: this.hasBorder,
[styles[`borderColor--${borderColor}`]]: this.hasBorder && borderColor !== 'inverse',
[styles['borderColor--inverse']]: this.hasBorder && background === 'inverse',
[styles[`textAlign--${textAlign}`]]: textAlign,
[styles[`background--${background}`]]: background,
get element () {
return getElementType(Link, this.props)
}
get element () {
return getElementType(Link, this.props)
}
render () {
const { alt, children, ...props } = this.props
const ElementType = getElementType(AccessibleContent, this.props)
return (
{alt}
{children}
)
}
}
render () {
const { as, ...rest } = this.props
const ElementType = getElementType(Separator, this.props, () => (as))
return (
<div role="presentation">
)
}
}</div>
renderTrigger () {
const { children, as } = this.props
const { hasFocus } = this.state
const triggerProps = {
'aria-describedby': this._id
}
if (as) {
const Trigger = getElementType(Tooltip, this.props)
const props = omitProps(this.props, Tooltip.propTypes)
return (
{children}
)
} else if (typeof children === 'function') {
return children(
{
focused: hasFocus,
getTriggerProps: (props) => {
return {
...triggerProps,
...props
}
}
get elementType () {
const { as } = this.props
return as || getElementType(Day, this.props)
}
href,
disabled,
readOnly,
onClick,
size,
margin,
elementRef
} = this.props
const classes = {
[styles.root]: true,
[styles[size]]: true,
[styles.clickable]: href || onClick,
[styles.disabled]: disabled
}
const Element = getElementType(Billboard, this.props)
return (