diff --git a/packages/grafana-ui/src/components/ConfirmButton/ConfirmButton.story.tsx b/packages/grafana-ui/src/components/ConfirmButton/ConfirmButton.story.tsx index 920f6103486..74fb8ca5a64 100644 --- a/packages/grafana-ui/src/components/ConfirmButton/ConfirmButton.story.tsx +++ b/packages/grafana-ui/src/components/ConfirmButton/ConfirmButton.story.tsx @@ -23,18 +23,20 @@ const getKnobs = () => { 'primary' ), disabled: boolean('Disabled', false), + closeOnConfirm: boolean('Close on confirm', true), }; }; storiesOf('General/ConfirmButton', module) .addDecorator(withCenteredStory) .add('default', () => { - const { size, buttonText, confirmText, confirmVariant, disabled } = getKnobs(); + const { size, buttonText, confirmText, confirmVariant, disabled, closeOnConfirm } = getKnobs(); return ( <>
| {user.login} | +{user.email} | {user.name} | {user.lastSeenAtAge} | -
-
-
-
+
+ |
+ |
+
- onRemoveUser(user)} className="btn btn-danger btn-small">
-
+ |
);
diff --git a/public/app/features/users/__mocks__/userMocks.ts b/public/app/features/users/__mocks__/userMocks.ts
index 7ca8ea71bd8..e040e2c750c 100644
--- a/public/app/features/users/__mocks__/userMocks.ts
+++ b/public/app/features/users/__mocks__/userMocks.ts
@@ -1,3 +1,5 @@
+import { OrgRole, OrgUser } from 'app/types';
+
export const getMockUsers = (amount: number) => {
const users = [];
@@ -15,7 +17,7 @@ export const getMockUsers = (amount: number) => {
});
}
- return users;
+ return users as OrgUser[];
};
export const getMockUser = () => {
@@ -27,9 +29,9 @@ export const getMockUser = () => {
lastSeenAtAge: '',
login: `user`,
orgId: 1,
- role: 'Admin',
+ role: 'Admin' as OrgRole,
userId: 2,
- };
+ } as OrgUser;
};
export const getMockInvitees = (amount: number) => {
diff --git a/public/app/features/users/__snapshots__/UsersActionBar.test.tsx.snap b/public/app/features/users/__snapshots__/UsersActionBar.test.tsx.snap
index 4c34060034f..e3499bf6785 100644
--- a/public/app/features/users/__snapshots__/UsersActionBar.test.tsx.snap
+++ b/public/app/features/users/__snapshots__/UsersActionBar.test.tsx.snap
@@ -42,22 +42,22 @@ exports[`Render should render pending invites button 1`] = `
}
}
>
- - |
-
-
-
+ |
+ |
-
-
+ size="sm"
+ variant="destructive"
+ />
+ |
| - |
-
-
-
+ |
+ |
-
-
+ size="sm"
+ variant="destructive"
+ />
+ |
| - |
-
-
-
+ |
+ |
-
-
+ size="sm"
+ variant="destructive"
+ />
+ |
| - |
-
-
-
+ |
+ |
-
-
+ size="sm"
+ variant="destructive"
+ />
+ |
| - |
-
-
-
+ |
+ |
-
-
+ size="sm"
+ variant="destructive"
+ />
+ |
| - |
-
-
-
+ |
+ |
-
-
+ size="sm"
+ variant="destructive"
+ />
+ |