-
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(zimbra): bump @ovhcloud/ods-components v18.3
ref: MANAGER-15662 Signed-off-by: Tristan WAGNER <[email protected]>
- Loading branch information
1 parent
df3c24c
commit 345326f
Showing
84 changed files
with
2,555 additions
and
3,511 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
41 changes: 23 additions & 18 deletions
41
packages/manager/apps/zimbra/src/components/BadgeStatus.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,29 +1,34 @@ | ||
import React from 'react'; | ||
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming'; | ||
import { OsdsChip } from '@ovhcloud/ods-components/react'; | ||
import React, { useMemo } from 'react'; | ||
import { OdsBadge } from '@ovhcloud/ods-components/react'; | ||
import { ODS_BADGE_COLOR } from '@ovhcloud/ods-components'; | ||
import { ResourceStatus } from '@/api/api.type'; | ||
|
||
export type BadgeStatusProps = { | ||
itemStatus: string; | ||
'data-testid'?: string; | ||
}; | ||
|
||
export const BadgeStatus: React.FC<BadgeStatusProps> = ({ itemStatus }) => { | ||
const getStatusColor = (status: string) => { | ||
switch (status) { | ||
case ResourceStatus.READY: | ||
return ODS_THEME_COLOR_INTENT.success; | ||
case ResourceStatus.ERROR: | ||
return ODS_THEME_COLOR_INTENT.error; | ||
default: | ||
return ODS_THEME_COLOR_INTENT.primary; | ||
} | ||
}; | ||
const getStatusColor = (status: string) => { | ||
switch (status) { | ||
case ResourceStatus.READY: | ||
return ODS_BADGE_COLOR.success; | ||
case ResourceStatus.ERROR: | ||
return ODS_BADGE_COLOR.critical; | ||
default: | ||
return ODS_BADGE_COLOR.information; | ||
} | ||
}; | ||
|
||
const statusColor = getStatusColor(itemStatus); | ||
export const BadgeStatus: React.FC<BadgeStatusProps> = (props) => { | ||
const statusColor = useMemo(() => getStatusColor(props.itemStatus), [ | ||
props.itemStatus, | ||
]); | ||
|
||
return ( | ||
<OsdsChip inline color={statusColor}> | ||
{itemStatus} | ||
</OsdsChip> | ||
<OdsBadge | ||
data-testid={props['data-testid']} | ||
color={statusColor} | ||
label={props.itemStatus} | ||
/> | ||
); | ||
}; |
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
79 changes: 0 additions & 79 deletions
79
packages/manager/apps/zimbra/src/components/ButtonTooltip/ButtonTooltip.tsx
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
packages/manager/apps/zimbra/src/components/ButtonTooltip/__test__/ButtonTooltip.spec.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.