Skip to content

Commit

Permalink
use lang component to resolve textresourcebindings (#2118)
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnusrm authored May 30, 2024
1 parent 7f0fa55 commit 97d3aff
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/layout/PaymentDetails/PaymentDetailsTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import type { ReactNode } from 'react';

import { Label, Table } from '@digdir/designsystemet-react';
import cn from 'classnames';
Expand All @@ -11,8 +10,8 @@ import type { OrderDetails } from 'src/features/payment/types';

type PaymentDetailsTableProps = {
orderDetails?: OrderDetails;
tableTitle?: ReactNode;
description?: ReactNode;
tableTitle?: string;
description?: string;
} & React.HTMLAttributes<HTMLTableElement>;

export const PaymentDetailsTable = ({ orderDetails, tableTitle, description, ...rest }: PaymentDetailsTableProps) => (
Expand All @@ -22,8 +21,8 @@ export const PaymentDetailsTable = ({ orderDetails, tableTitle, description, ...
>
{tableTitle && (
<Caption
title={tableTitle}
description={description}
title={<Lang id={tableTitle} />}
description={<Lang id={description} />}
/>
)}

Expand Down

0 comments on commit 97d3aff

Please sign in to comment.