RectangleAvatar.jsx 555 Bytes
Newer Older
Giang Tran committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import React from 'react'
import { Icon } from '@material-ui/core'

const RectangleAvatar = ({ color = 'primary', icon, textIcon, style }) => {
    return (
        <div
            className={`rectangle-box bg-light-${color} flex justify-center items-center`}
            style={style}
        >
            {textIcon ? (
                <h5 className={`font-medium m-0 text-${color}`}>{textIcon}</h5>
            ) : (
                <Icon className={`text-${color}`}>{icon}</Icon>
            )}
        </div>
    )
}

export default RectangleAvatar