Repository URL to install this package:
|
Version:
0.14.1 ▾
|
import React, { ReactNode } from 'react'
import { PlusMinusProps, VectorProps } from './typings'
import { Wrapper } from './styled'
import { MinusVector, PlusVector } from './vectors'
const defaultRenderIconView = (props: PlusMinusProps) => {
const { type } = props
return type === 'plus' ? (
<PlusVector {...props} />
) : (
<MinusVector {...props} />
)
}
const defaultWrapper = (
props: PlusMinusProps,
attributes?: VectorProps,
icon?: ReactNode
) => {
return props.nowrap ? (
<React.Fragment>{icon}</React.Fragment>
) : (
<Wrapper {...attributes}>{icon}</Wrapper>
)
}
export { defaultRenderIconView, defaultWrapper }