-
Couldn't load subscription status.
- Fork 7
Widgets implementation #1234
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
Widgets implementation #1234
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1234 +/- ##
=======================================
Coverage 13.89% 13.90%
=======================================
Files 535 549 +14
Lines 11457 11539 +82
Branches 2885 2908 +23
=======================================
+ Hits 1592 1604 +12
- Misses 9858 9928 +70
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| } | ||
|
|
||
| const ImageBannerComponent: React.FC<Props & ExternalProps> = ({ imageUrl, styles, urlToOpen }) => { | ||
| const linkHandler = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import { withTheme } from '../../core/theme/with-theme'; | ||
| import stylesProvider from './styles'; | ||
|
|
||
| interface ExternalProps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IExternalProps
| urlToOpen: string; | ||
| } | ||
|
|
||
| interface Props { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have IThemeProps<ReturnType<typeof stylesProvider>>,
Remove this
| import { withTheme } from '../../core/theme/with-theme'; | ||
| import stylesProvider from './styles'; | ||
|
|
||
| interface ExternalProps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IExternalProps
| } | ||
|
|
||
| interface Props { | ||
| styles: ReturnType<typeof stylesProvider>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this and use theme props
| style={styles.affiliateBanner} | ||
| /> | ||
|
|
||
| <AccountSummary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be removed
| fontSize: normalizeFontAndLineHeight(18), | ||
| fontWeight: '400', | ||
| lineHeight: normalizeFontAndLineHeight(22), | ||
| letterSpacing: -0.4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not use this
src/components/widgets/types.ts
Outdated
| firstLine: string; | ||
| secondLine: string; | ||
| icon: { | ||
| value: string; // IconValues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove string and change to IconValues
| return <ThreeLinesCta data={item.data as I3LinesCtaData[]} cta={item.cta} />; | ||
| case ModuleTypes.BALANCES_GRID_ICONS: | ||
| return <Summary data={item.data} />; | ||
| case ModuleTypes.SEPARATOR: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make a Separator component
src/components/widgets/widgets.tsx
Outdated
|
|
||
| const renderItem = ({ item }) => { | ||
| switch (item.modules[0].type) { | ||
| case 'image-banner': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to a separate components
| accountStats={this.props.accountStats} | ||
| /> | ||
|
|
||
| <Widgets /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to implement SmartScreen and do something
// Class SmartScreen
// - Component Widgets (response API), typeof IScreenResponse
// | '3-lines-cta'
// | 'static-text-columns-top-header'
// | 'static-text-columns-bottom-header'
// | 'balances-grid-icons'
// | 'single-balance-icon'
// | 'image-banner'
// | '2-lines-text-banner'
// | 'separator';
|
You have to move all the components from above in the the folder |

No description provided.