Skip to content

feat(mrc): adding and adapting ods react 19 #17749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ module.exports = {
{
files: [
'**/App.tsx',
'packages/manager/modules/**/index*',
'**/test.{setup,provider}.tsx',
'**/vitest.config.{js,ts,mjs,mts}',
'**/vite.config.{js,ts,mjs,mts}',
Expand Down
2 changes: 2 additions & 0 deletions packages/manager-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"@ovh-ux/manager-tailwind-config": "^0.3.0",
"@ovh-ux/manager-vite-config": "^0.10.1",
"@ovhcloud/ods-components": "^18.6.2",
"@ovhcloud/ods-react": "^19.0.0-alpha.2",
"@ovhcloud/ods-themes": "^18.6.2",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.0.0",
Expand Down Expand Up @@ -108,6 +109,7 @@
"@ovh-ux/manager-core-utils": "*",
"@ovh-ux/manager-react-shell-client": "^0.8.7",
"@ovhcloud/ods-components": "^18.3.0",
"@ovhcloud/ods-react": "^19.0.0-alpha.2",
"@ovhcloud/ods-themes": "^18.3.0",
"date-fns": "~4.1.0",
"i18next": "^23.8.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ComponentProps } from 'react';
import { OdsBadge, OdsSkeleton } from '@ovhcloud/ods-components/react';
import { Button } from '@ovhcloud/ods-react';

export interface BadgeProps extends ComponentProps<typeof OdsBadge> {
isLoading?: boolean;
Expand All @@ -10,6 +11,9 @@ export const Badge = ({ isLoading, ...props }: BadgeProps) => {
return isLoading ? (
<OdsSkeleton data-testid={`${props['data-testid']}`} />
) : (
<OdsBadge {...props} />
<>
<Button />
<OdsBadge {...props} />
</>
);
};
2 changes: 1 addition & 1 deletion packages/manager-react-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"jsx": "react-jsx"
},
"files": ["global.d.ts"],
"include": ["src/**/*", "*.spec.tsx"],
"include": ["src/**/*", "*.spec.tsx", "types"],
"exclude": ["./src/**/*.stories.*"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare module '@ovhcloud/ods-react' {
export * from '@ovhcloud/ods-react/dist/components/button/src';
export * from '@ovhcloud/ods-react/dist/components/badge/src';
export * from '@ovhcloud/ods-react/dist/components/card/src';
// etc.
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const BillingMonthlyActionPage: FC<TBillingMonthlyActionPageProps> = ({
};

const pricingHref = useMemo(() => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
return ovhSubsidiary
? INSTANCE_PRICING_LINKS[
ovhSubsidiary as keyof typeof INSTANCE_PRICING_LINKS
Expand Down
Loading
Loading