Skip to content

Commit

Permalink
Merge pull request #8 from yauheni-kryzhyk-deriv/yauheni/74117/iconme…
Browse files Browse the repository at this point in the history
…ssagecontent_ts_migration

Yauheni/74117/iconmessagecontent ts migration
  • Loading branch information
suisin-deriv authored Nov 1, 2022
2 parents f6405c0 + 38c7d30 commit ba4eebf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
import React from 'react';
import { PropTypes } from 'prop-types';
import classNames from 'classnames';
import { Div100vhContainer, Text } from '@deriv/components';
import { isDesktop } from '@deriv/shared';

const IconMessageContent = ({ children, className, full_width, icon, icon_row, message, text }) => (
type TIconMessageContent = {
className?: string;
full_width?: boolean;
icon: React.ReactElement;
message: React.ReactNode;
text?: string | React.ReactElement;
};

const IconMessageContent = ({
children,
className,
full_width,
icon,
message,
text,
}: React.PropsWithChildren<TIconMessageContent>) => (
<Div100vhContainer
className={classNames('account-management__message-wrapper', {
'account-management__message-wrapper-full-width': full_width,
Expand All @@ -26,7 +40,6 @@ const IconMessageContent = ({ children, className, full_width, icon, icon_row, m
{icon}
</div>
)}
{icon_row && <div>{icon_row}</div>}
<Text
as='div'
color='general'
Expand Down Expand Up @@ -58,13 +71,4 @@ const IconMessageContent = ({ children, className, full_width, icon, icon_row, m
</Div100vhContainer>
);

IconMessageContent.propTypes = {
children: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.bool]),
className: PropTypes.string,
full_width: PropTypes.bool,
icon: PropTypes.object,
icon_row: PropTypes.object,
message: PropTypes.oneOfType([PropTypes.node, PropTypes.string, PropTypes.object]),
text: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
};
export default IconMessageContent;
3 changes: 0 additions & 3 deletions packages/account/src/Components/icon-message-content/index.js

This file was deleted.

3 changes: 3 additions & 0 deletions packages/account/src/Components/icon-message-content/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import IconMessageContent from './icon-message-content';

export default IconMessageContent;

0 comments on commit ba4eebf

Please sign in to comment.