Skip to content

Commit

Permalink
Merge pull request #9 from likhith-deriv/likhith/fix-testcase
Browse files Browse the repository at this point in the history
fix: ✅ fixed testcase
  • Loading branch information
utkarsha-deriv committed Sep 11, 2023
2 parents 08217cc + f81c60b commit 3208966
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useIsMounted } from '@deriv/shared';
import { Button, Icon, Modal, Text, Popover, useCopyToClipboard } from '@deriv/components';
import { Localize, localize } from '@deriv/translations';
import { Localize } from '@deriv/translations';
import { TPopoverAlignment } from 'Types';

type TApiTokenClipboard = {
Expand All @@ -13,7 +13,7 @@ type TApiTokenClipboard = {
};

type TWarningNoteBullet = {
message: string;
message: string | JSX.Element;
};

const WarningNoteBullet = ({ message }: TWarningNoteBullet) => (
Expand All @@ -28,14 +28,14 @@ const WarningNoteBullet = ({ message }: TWarningNoteBullet) => (
const WarningDialogMessage = () => (
<React.Fragment>
<Text as='p' color='prominent ' size='xs' line_height='m'>
{localize(
'Be careful who you share this token with. Anyone with this token can perform the following actions on your account behalf'
)}
<Localize i18n_default_text='Be careful who you share this token with. Anyone with this token can perform the following actions on your account behalf' />
</Text>
<div className='da-api-token__bullet-container'>
<WarningNoteBullet message={localize('Add accounts')} />
<WarningNoteBullet message={localize('Create or delete API tokens for trading and withdrawals')} />
<WarningNoteBullet message={localize('Modify account settings')} />
<WarningNoteBullet message={<Localize i18n_default_text='Add accounts' />} />
<WarningNoteBullet
message={<Localize i18n_default_text='Create or delete API tokens for trading and withdrawals' />}
/>
<WarningNoteBullet message={<Localize i18n_default_text='Modify account settings' />} />
</div>
</React.Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const ApiToken = () => {
data-lpignore='true'
type='text'
className='da-api-token__input dc-input__input-group'
label={<Localize i18n_default_text='Token name' />}
label={localize('Token name')}
value={values.token_name}
onChange={e => {
setFieldTouched('token_name', true);
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type TInputProps = {
input_id?: string;
is_relative_hint?: boolean;
label_className?: string;
label?: React.ReactNode;
label?: string;
leading_icon?: React.ReactElement;
max_characters?: number;
maxLength?: number;
Expand Down

0 comments on commit 3208966

Please sign in to comment.