Skip to content

Commit

Permalink
Revert "Use TopNavControlButtonData for channel test button (#243) (#268
Browse files Browse the repository at this point in the history
)"

This reverts commit 127eae4.
  • Loading branch information
jowg-amazon committed Sep 24, 2024
1 parent 618d6b1 commit 0ab8af7
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions public/pages/Channels/components/details/ChannelDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { ChannelDetailItems } from './ChannelDetailItems';
import { ChannelDetailsActions } from './ChannelDetailsActions';
import { ChannelSettingsDetails } from './ChannelSettingsDetails';
import PageHeader from "../../../../components/PageHeader/PageHeader";
import { TopNavControlButtonData } from '../../../../../../../src/plugins/navigation/public';

interface ChannelDetailsProps extends RouteComponentProps<{
id: string
Expand Down Expand Up @@ -191,12 +190,19 @@ export function ChannelDetails(props: ChannelDetailsProps) {
),
},
{
controlType: 'button',
testId: 'send-test-message-button',
isDisabled: !channel?.is_enabled,
run: sendTestMessage,
label: 'Send test message',
} as TopNavControlButtonData,
renderComponent: (
<div style={{ display: 'flex', alignItems: 'center' }}>
<EuiSmallButton
data-test-subj="send-test-message-button"
onClick={sendTestMessage}
style={{ marginLeft: '10px' }}
disabled={!channel?.is_enabled}
>
Send test message
</EuiSmallButton>
</div>
),
},
];

const badgeComponent = <EuiFlexItem grow={false} style={{ paddingBottom: 5 }}>
Expand Down

0 comments on commit 0ab8af7

Please sign in to comment.