Przeglądaj źródła

Merge pull request #415 from smiclea/edit-tooltip

Show tooltip if edit replica button is disabled
Dorin Paslaru 6 lat temu
rodzic
commit
6a1e04c428

+ 2 - 0
src/components/molecules/ActionDropdown/ActionDropdown.jsx

@@ -62,6 +62,7 @@ export type Action = {
   action: () => void,
   disabled?: boolean,
   hidden?: boolean,
+  title?: ?string,
 }
 export type Props = {
   label: string,
@@ -168,6 +169,7 @@ class ActionDropdown extends React.Component<Props, State> {
             color={action.color}
             disabled={action.disabled}
             data-test-id={`${TEST_ID}-listItem-${action.label}`}
+            title={action.title}
           >
             {action.label}
           </ListItem>

+ 1 - 0
src/components/pages/ReplicaDetailsPage/ReplicaDetailsPage.jsx

@@ -386,6 +386,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
       action: () => { this.handleCreateMigrationClick() },
     }, {
       label: 'Edit',
+      title: !this.state.isEditable ? 'At least one of the providers doesn\'t support editing' : null,
       action: () => { this.handleReplicaEditClick() },
       disabled: !this.state.isEditable,
     }, {