-
Notifications
You must be signed in to change notification settings - Fork 937
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: yujin-emma <yujin.emma.work@gmail.com>
- Loading branch information
1 parent
9de49fa
commit 8de1750
Showing
4 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/plugins/data_source_management/public/components/toast_button/switch_default_button.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { EuiButton } from '@elastic/eui'; | ||
import React from 'react'; | ||
import { i18n } from '@osd/i18n'; | ||
|
||
export const switchDefaultButton = (handleSwitchDefaultDatasource: () => Promise<void>) => { | ||
return ( | ||
Check warning on line 11 in src/plugins/data_source_management/public/components/toast_button/switch_default_button.tsx Codecov / codecov/patchsrc/plugins/data_source_management/public/components/toast_button/switch_default_button.tsx#L11
|
||
<EuiButton | ||
data-test-subj="dataSourceViewErrorSwitchButton" | ||
fill={false} | ||
size="s" | ||
onClick={handleSwitchDefaultDatasource} | ||
> | ||
{i18n.translate('dataSourcesManagement.dataSourceViewError.switchToDefaultDataSource', { | ||
defaultMessage: 'Switch to default data source', | ||
})} | ||
</EuiButton> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters