import { Component } from "react"

interface ColorTitleProps {
  color: string;
}

class ColorTitle extends Component<ColorTitleProps, {}> {

  constructor(props: ColorTitleProps) {
    // Default constructor. Not required but shown here for clarity.
    // We won't include the default constructor in future examples.
    super(props);
    // We can access the props using this.props after the super() call.
  }

  render() {
    return (
      <p>Selected Color: {this.props.color}</p>
    );
  }

}

export default ColorTitle;