Skip to content

Commit

Permalink
feat(rbac): center align toast (#1090)
Browse files Browse the repository at this point in the history
  • Loading branch information
divyanshiGupta authored Jan 24, 2024
1 parent bc98491 commit 697c96f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
9 changes: 7 additions & 2 deletions plugins/rbac/src/components/RolesList/RolesListToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const useStyles = makeStyles(theme => ({
rbacPreReqLink: {
color: theme.palette.link,
},
alertTitle: {
fontWeight: 'bold',
},
}));

export const RolesListToolbar = ({
Expand All @@ -29,8 +32,10 @@ export const RolesListToolbar = ({
<div>
{!createRoleLoading && !createRoleAllowed && (
<Alert severity="warning" data-testid="create-role-warning">
<AlertTitle>Unable to create role.</AlertTitle>
To enable create role button, the role associacted with your user
<AlertTitle className={classes.alertTitle}>
Unable to create role.
</AlertTitle>
To enable create role button, the role associated with your user
should have the permission policies mentioned{' '}
<a
href="https://github.com/janus-idp/backstage-plugins/tree/main/plugins/rbac#prerequisites"
Expand Down
11 changes: 2 additions & 9 deletions plugins/rbac/src/components/SnackbarAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,10 @@ export const SnackbarAlert = ({
open={toastMessage !== ''}
autoHideDuration={6000}
anchorOrigin={{ vertical: 'top', horizontal: 'right' }}
sx={{ width: '100%' }}
style={{ top: '100px', right: '20px' }}
style={{ top: '100px', left: '0px', justifyContent: 'center' }}
onClose={onAlertClose}
>
<Alert
onClose={onAlertClose}
severity="info"
variant="filled"
icon={false}
sx={{ width: '60%' }}
>
<Alert onClose={onAlertClose} severity="success">
{toastMessage}
</Alert>
</Snackbar>
Expand Down

0 comments on commit 697c96f

Please sign in to comment.