import React from 'react'

const GeneralBanner = (props) => {
    const bannerClassName = `general-banner alert ${props.banner.statusColor}`
    
    return (
        <div className={bannerClassName}>
            <div className="messsage"><strong>Announcement:</strong> {props.banner.message}</div>
        </div>
    )
}

export default GeneralBanner
import React, {Component} from 'react'

export default class GeneralBanner extends Component {
    render() {
        const bannerClassName = `general-banner alert ${this.props.banner.statusColor}`
        return (
            <div className={bannerClassName}>
                <div className="messsage"><strong>Announcement:</strong> {this.props.banner.message}</div>
            </div>
        )
    }
}
Refactor general banner function to react component
Refactor general banner function to react component
