Switched IconButton to fully compositional format for generalisation

This commit is contained in:
Vincent 2019-12-06 17:07:31 +11:00
parent 3a03591e00
commit fa8f310b02
2 changed files with 3 additions and 4 deletions

View file

@ -121,7 +121,7 @@ export enum SessionIconSizes {
Large = 'large',
}
interface Props {
export interface Props {
iconType: SessionIconTypes;
iconSize: SessionIconSizes;
iconColor: string;
@ -233,7 +233,6 @@ export class SessionIcon extends React.PureComponent<Props> {
height={iconDimensions}
style={styles}
>
{}
<path d={iconDef.path} fill={iconColor} />
</svg>
);

View file

@ -1,9 +1,9 @@
import React from 'react';
import classNames from 'classnames';
import { SessionIcon } from './SessionIcon';
import { Props, SessionIcon } from './SessionIcon';
export class SessionIconButton extends SessionIcon {
export class SessionIconButton extends React.PureComponent<Props> {
constructor(props: any) {
super(props);
this.clickHandler = this.clickHandler.bind(this);