import React from "react"
import './index.less'

interface Props {
    children: React.ReactNode;
    label?: string,
    style?: React.CSSProperties
    titleStyle?: React.CSSProperties
}
const Selector: React.FC<Props> = (props) => {

    /****************/
    const { label, children, style, titleStyle } = props
    /****************/

    return <div className="selector" style={style}>
        {label && <span className="selectorLabel" style={titleStyle}>{label}</span>}{children}
    </div>
}

export default React.memo(Selector)