-
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(pci.private-network): improve optimistic call function
ref: -1826 Signed-off-by: tsiorifamonjena <[email protected]>
- Loading branch information
1 parent
5b30b64
commit f8a89eb
Showing
10 changed files
with
78 additions
and
65 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
File renamed without changes.
28 changes: 28 additions & 0 deletions
28
...ages/manager/apps/pci-private-network/src/components/status-info/StatusInfo.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { FC } from 'react'; | ||
import { ODS_CHIP_SIZE } from '@ovhcloud/ods-components'; | ||
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming'; | ||
import { OsdsChip } from '@ovhcloud/ods-components/react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { ResourceStatus } from '@/types/network.type'; | ||
|
||
const StatusInfo: FC<{ | ||
label: ResourceStatus; | ||
}> = ({ label }) => { | ||
const { t } = useTranslation('listing'); | ||
const color = { | ||
[ResourceStatus.ACTIVE]: ODS_THEME_COLOR_INTENT.success, | ||
[ResourceStatus.DISABLED]: ODS_THEME_COLOR_INTENT.warning, | ||
}; | ||
|
||
return ( | ||
<OsdsChip | ||
className="inline-flex m-3" | ||
size={ODS_CHIP_SIZE.sm} | ||
color={color[label]} | ||
> | ||
{t(label)} | ||
</OsdsChip> | ||
); | ||
}; | ||
|
||
export default StatusInfo; |
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
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