import React, {Component} from "react"; type IconProps = { width: number, height: number, } class Icon extends Component { private readonly width: string; private readonly height: string; constructor(props) { super(props); this.width = "w-" + this.props.width.toString(); this.height = "h-" + this.props.width.toString(); } dimensionsClassName() { return (this.height + " " + this.width) } } export class DollarIcon extends Icon { render() { return ( ) } } export class ClockIcon extends Icon { render() { return ( ) } }