Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const mapIconSize = props => {
const btnToIconSizes = {
[vars.sizes.xSmall]: iconSizes.small,
[vars.sizes.small]: iconSizes.medium,
[vars.sizes.medium]: iconSizes.medium,
[vars.sizes.large]: iconSizes.medium
}
return btnToIconSizes[props.size]
? btnToIconSizes[props.size]
: iconSizes.medium
}
const ItemIcon = props => {
return (
<div>
{React.cloneElement(props.children, { size: iconSizes.medium })}
</div>
)
}
ItemIcon.propTypes = {
const mapIconSize = props => {
const btnToIconSizes = {
[vars.sizes.xSmall]: iconSizes.small,
[vars.sizes.small]: iconSizes.medium,
[vars.sizes.medium]: iconSizes.medium,
[vars.sizes.large]: iconSizes.medium
}
return btnToIconSizes[props.size]
? btnToIconSizes[props.size]
: iconSizes.medium
}
const isPrev = props.direction === Control.directions.prev
const visible = isPrev ? activePage > 0 : activePage !== pageCount - 1
const IconCaret = isPrev ? CaretLeftIcon : CaretRightIcon
const handleClick = combineFns(isPrev ? prev : next, props.onClick)
return (
<li>
<button aria-label="{isPrev">
</button>
</li>
)
}