[Feature] Update Manage user Archive and Unarchive button style (#3089)

* Update archive/unarchive style

* update button styles
This commit is contained in:
Eyuel Berga Woldemichael 2022-05-25 05:36:17 +03:00 committed by GitHub
parent a80f7c950e
commit 50f5b9fa77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -290,7 +290,9 @@ class ManageOrgUsers extends React.Component {
<div
className="card-table fixedHeader table-responsive table-bordered"
ref={this.tableRef}
style={{ maxHeight: this.tableRef.current && this.calculateOffset() }}
style={{
maxHeight: this.tableRef.current && this.calculateOffset(),
}}
>
<table data-testid="usersTable" className="table table-vcenter" disabled={true}>
<thead>
@ -383,7 +385,13 @@ class ManageOrgUsers extends React.Component {
)}
</td>
<td>
<a
<button
type="button"
style={{ minWidth: '100px' }}
className={`btn btn-sm btn-${user.status === 'archived' ? 'success' : 'danger'} ${
unarchivingUser === user.id || archivingUser === user.id ? 'btn-loading' : ''
}`}
disabled={unarchivingUser === user.id || archivingUser === user.id}
onClick={() => {
user.status === 'archived'
? this.unarchiveOrgUser(user.id)
@ -391,9 +399,7 @@ class ManageOrgUsers extends React.Component {
}}
>
{user.status === 'archived' ? 'Unarchive' : 'Archive'}
{unarchivingUser === user.id || archivingUser === user.id ? '...' : ''}
</a>
</button>
</td>
</tr>
))}