Skip to content

Commit

Permalink
Use TopNavControlButtonData for channel test button (#243)
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <miki@amazon.com>
(cherry picked from commit 6121bd4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Aug 30, 2024
1 parent ba60d77 commit b531f32
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions public/pages/Channels/components/details/ChannelDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ 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,19 +192,12 @@ export function ChannelDetails(props: ChannelDetailsProps) {
),
},
{
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>
),
},
controlType: 'button',
testId: 'send-test-message-button',
isDisabled: !channel?.is_enabled,
run: sendTestMessage,
label: 'Send test message',
} as TopNavControlButtonData,
];

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

0 comments on commit b531f32

Please sign in to comment.