-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(manager-react-components): upgrade ods version 18
ref: MANAGER-14622 Signed-off-by: Alex Boungnaseng <[email protected]>
- Loading branch information
1 parent
3675b01
commit 2e50b13
Showing
19 changed files
with
270 additions
and
288 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
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
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
30 changes: 9 additions & 21 deletions
30
packages/manager-react-components/src/components/clipboard/clipboard.component.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 |
---|---|---|
@@ -1,31 +1,19 @@ | ||
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming'; | ||
import { OdsClipboardAttribute } from '@ovhcloud/ods-components'; | ||
import { OsdsClipboard, OsdsText } from '@ovhcloud/ods-components/react'; | ||
import type { OdsClipboard as OdsClipboardAttribute } from '@ovhcloud/ods-components'; | ||
import { OdsClipboard } from '@ovhcloud/ods-components/react'; | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import './translations'; | ||
import './index.scss'; | ||
|
||
export const Clipboard: React.FC<OdsClipboardAttribute> = (props) => { | ||
const { t } = useTranslation('clipboard'); | ||
|
||
return ( | ||
<OsdsClipboard {...props} data-testid="clipboard"> | ||
<span slot="success-message"> | ||
<OsdsText | ||
color={ODS_THEME_COLOR_INTENT.success} | ||
data-testid="clipboard-success" | ||
> | ||
{t('clipboard_copy_success')} | ||
</OsdsText> | ||
</span> | ||
<span slot="error-message"> | ||
<OsdsText | ||
color={ODS_THEME_COLOR_INTENT.error} | ||
data-testid="clipboard-error" | ||
> | ||
{t('clipboard_copy_error')} | ||
</OsdsText> | ||
</span> | ||
</OsdsClipboard> | ||
<OdsClipboard | ||
{...props} | ||
data-testid="clipboard" | ||
labelCopySuccess={t('clipboard_copy_success')} | ||
labelCopy={t('clipboard_copy"')} | ||
/> | ||
); | ||
}; |
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
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
Oops, something went wrong.