Skip to content
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

Suisin/74081/ts migration of account limits table header and tests #26

Merged
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import PropTypes from 'prop-types';
import * as React from 'react';
import classNames from 'classnames';
import { Text } from '@deriv/components';

const AccountLimitsTableHeader = ({ align, children, renderExtraInfo }) => {
type TAccountLimitsTableHeader = {
align: 'left' | 'right';
renderExtraInfo: () => React.ReactNode;
};

const AccountLimitsTableHeader = ({
align,
children,
renderExtraInfo,
}: React.PropsWithChildren<Partial<TAccountLimitsTableHeader>>) => {
return (
<th
className={classNames('da-account-limits__table-header', {
Expand All @@ -30,10 +38,4 @@ const AccountLimitsTableHeader = ({ align, children, renderExtraInfo }) => {
);
};

AccountLimitsTableHeader.propTypes = {
align: PropTypes.oneOf(['right', 'left']),
children: PropTypes.any,
renderExtraInfo: PropTypes.func,
};

export default AccountLimitsTableHeader;
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import AccountLimitsExtraInfo from './account-limits-extra-info.jsx';
import AccountLimitsFooter from './account-limits-footer.jsx';
import AccountLimitsOverlay from './account-limits-overlay.jsx';
import AccountLimitsTableCell from './account-limits-table-cell.jsx';
import AccountLimitsTableHeader from './account-limits-table-header.jsx';
import AccountLimitsTableHeader from './account-limits-table-header';
import AccountLimitsTurnoverLimitRow from './account-limits-turnover-limit-row.jsx';

const AccountLimits = ({
Expand Down