-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add base skeleton for edit user in team sidebar modal DPSTAT-894 * added removeUserfromGroups function * Update view for in edit user in team Sidebar Modal with correct data * Added functionality to edit user group in team dropdown * . * Refactors SidebarModal duplicated code for add/edit user in team * temporary fix for removing user from a group * . * Reset select group dropdown for edit user * Update edit user requests; include form resets, spinnger and error messages * Fix double spinner and refactor modal code * Add alignment options for Table and center edit user column data * . * Add delete user feature for edit user in team * Add conditional rendering for user editing in teams * Use useCallback for team manager view conditional * Create DeleteLink component for editing * Fix view for dropdown on onSelect when editing users --------- Co-authored-by: ssb-jnk <[email protected]>
- Loading branch information
1 parent
a19acc4
commit 33e97af
Showing
9 changed files
with
637 additions
and
88 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import styles from './deletelink.module.scss' | ||
|
||
import { Trash2 } from 'react-feather' | ||
|
||
interface DeleteLink { | ||
children: string | ||
tabIndex?: number | ||
icon?: boolean | ||
handleDeleteUser: CallableFunction | ||
} | ||
|
||
const DeleteLink = ({ children, tabIndex, icon, handleDeleteUser }: DeleteLink) => { | ||
return ( | ||
<a className={styles.deleteLinkWrapper} tabIndex={tabIndex ?? 0} onClick={() => handleDeleteUser}> | ||
{icon && <Trash2 size={22} />} | ||
<span>{children}</span> | ||
</a> | ||
) | ||
} | ||
|
||
export default DeleteLink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@use '@statisticsnorway/ssb-component-library/src/style/variables' as variables; | ||
|
||
.deleteLinkWrapper { | ||
display: inline-flex; | ||
align-items: center; | ||
color: variables.$ssb-red-3; | ||
padding: .5rem; | ||
line-height: 1.7; | ||
cursor: pointer; | ||
|
||
svg { | ||
margin-right: .5rem; | ||
} | ||
|
||
span { | ||
border-bottom: 1px solid; | ||
} | ||
|
||
&:focus { | ||
@include variables.focus-marker; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.