Implement IconOnly button type

This commit is contained in:
Justin Edmund 2022-02-28 01:01:33 -08:00
parent 7131f484a6
commit 4998072475
2 changed files with 3 additions and 1 deletions

View file

@ -81,7 +81,8 @@ class Button extends React.Component<Props, State> {
return <button className={classes} disabled={this.props.disabled} onClick={this.props.click}>
{icon}
<span className='text'>{this.props.children}</span>
{ (this.props.type != ButtonType.IconOnly) ?
<span className='text'>{this.props.children}</span> : '' }
</button>
}
}

View file

@ -1,5 +1,6 @@
export enum ButtonType {
Base,
IconOnly,
Destructive
}