let cn = classNames.bind(styles);
let deleteButton = cn('btn btn-sm btn-primary');
let deleteButtonIcon = cn('fa', {
'fa-trash': !this.props.deleting,
'fa-spinner': this.props.deleting,
'fa-spin': this.props.deleting
});
return (
<button
bs-button
className={deleteButton}
onClick={this.deleteRoute}
disabled={this.state.deleting}
>
<i className={deleteButtonIcon} aria-hidden="true"></i>
</button>
);
TypeScript
복사