Skip to content

Commit

Permalink
refactor: ♻️ Improve variant verification for users page kebab menu
Browse files Browse the repository at this point in the history
  • Loading branch information
rique223 committed Jul 17, 2024
1 parent 9fd9503 commit 6ebd904
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ const AdminUserInfoActions = ({
secondary
flexShrink={0}
key='menu'
renderItem={({ label: { label, icon }, ...props }): ReactElement => <Option label={label} title={label} icon={icon} {...props} />}
renderItem={({ label: { label, icon }, ...props }): ReactElement => (
<Option label={label} title={label} icon={icon} variant={label === 'Delete' ? 'danger' : ''} {...props} />
)}
options={menuOptions}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,9 @@ const UsersTableRow = ({ user, onClick, onReload, isMobile, isLaptop, tab, isSea
placement='bottom-start'
flexShrink={0}
key='menu'
renderItem={({ label: { label, icon }, ...props }): ReactElement =>
label === 'Delete' ? (
<Option label={label} title={label} icon={icon} variant='danger' {...props} />
) : (
<Option label={label} title={label} icon={icon} {...props} />
)
}
renderItem={({ label: { label, icon }, ...props }): ReactElement => (
<Option label={label} title={label} icon={icon} variant={label === 'Delete' ? 'danger' : ''} {...props} />
)}
options={menuOptions}
/>
</GenericTableCell>
Expand Down

0 comments on commit 6ebd904

Please sign in to comment.