import { Component } from "react" interface ColorTitleProps { color: string; } class ColorTitle extends Component { 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 (

Selected Color: {this.props.color}

); } } export default ColorTitle;