import React, { Children, CSSProperties, ReactNode } from 'react'
import './index.less'
import ModuleTitleWithTabs from '../ModuleTitleWithTabs'

type CardProps ={
    title: string,
    extra?: ReactNode,
    children: ReactNode,
    style?: CSSProperties
}
export default function HncyCard({
    title,
    extra,
    children,
    style
}: CardProps) {
    return (
        <div className='workers-wrapper' style={style}>
            <div
                style={{
                    display: 'flex',
                    justifyContent: 'space-between',
                    alignItems: 'center'
                }}
            >
                <ModuleTitleWithTabs title={title} />
                {extra}
            </div>
            <div className='content'>
                {children}
            </div>
        </div>
    )
}
