-
Notifications
You must be signed in to change notification settings - Fork 299
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
Ashraf pre appstore #6297
Merged
mahdiyeh-deriv
merged 14 commits into
binary-com:pre-appstore
from
ashraf-deriv:ashraf-pre-appstore
Sep 7, 2022
Merged
Ashraf pre appstore #6297
Changes from 5 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
30b5d23
feat: platform launcher element with responsive
ashraf-deriv 791de81
Merge branch 'pre-appstore' of github.com:binary-com/deriv-app into a…
ashraf-deriv cbf56d8
remove unwanted folder
ashraf-deriv cb092f9
pixel to rem conversion
ashraf-deriv f99b468
using css available variables
ashraf-deriv 7578271
PR review suggestions
ashraf-deriv d5377a4
conflict fix
ashraf-deriv 66ae948
eslint revert
ashraf-deriv 6626b28
Merge branch 'pre-appstore' of github.com:binary-com/deriv-app into a…
ashraf-deriv 5d1032d
package-lock json file changes revert
ashraf-deriv 685db4b
revert package-lock.json file changes
ashraf-deriv 4944abb
revert package
ashraf-deriv 1930746
revert package
ashraf-deriv 8411bc2
revert package
ashraf-deriv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
packages/appstore/src/assets/svgs/wallet/ic-brand-binarybot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
packages/appstore/src/assets/svgs/wallet/ic-brand-smarttrader.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import PlatformLauncher from './platform-launcher'; | ||
import './platform-launcher.scss'; | ||
|
||
export default PlatformLauncher; |
137 changes: 137 additions & 0 deletions
137
packages/appstore/src/components/platform-launcher/platform-launcher.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
.platform-launcher { | ||
@include mobile { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: flex-start; | ||
padding: 0rem; | ||
ashraf-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
height: 5.6rem; | ||
} | ||
&__container { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
padding: 0rem; | ||
ashraf-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
gap: 1.6rem; | ||
|
||
width: 18.32rem; | ||
height: 5.4rem; | ||
margin-bottom: 1.6rem; | ||
&--icon { | ||
width: 3.2rem; | ||
height: 3.2rem; | ||
} | ||
&--title-desc-container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
padding: 0rem; | ||
ashraf-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
width: 13.52rem; | ||
height: 5.4rem; | ||
&--title { | ||
width: 13.52rem; | ||
height: 1.8rem; | ||
|
||
ashraf-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
font-style: normal; | ||
font-weight: 700; | ||
font-size: 1.2rem; | ||
line-height: 1.8rem; | ||
} | ||
&--description { | ||
width: 16rem; | ||
height: 3.6rem; | ||
|
||
ashraf-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
font-style: normal; | ||
font-weight: 400; | ||
font-size: 1.2rem; | ||
line-height: 1.8rem; | ||
} | ||
@include mobile { | ||
width: 18.3rem; | ||
height: 2.8rem; | ||
left: 0rem; | ||
top: 0rem; | ||
|
||
&--title { | ||
width: 16.4rem; | ||
height: 1.4rem; | ||
font-size: 1rem; | ||
} | ||
&--description { | ||
width: 18.3rem; | ||
height: 1.4rem; | ||
|
||
ashraf-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
font-family: 'IBM Plex Sans'; | ||
font-style: normal; | ||
font-weight: 400; | ||
font-size: 0.96rem; | ||
line-height: 1.4rem; | ||
/* or 150% */ | ||
|
||
/* system/light/2 - general (text) */ | ||
|
||
color: $color-black-1; | ||
} | ||
} | ||
} | ||
@include mobile { | ||
justify-content: center; | ||
padding: 0rem 0rem 0rem 0.8rem; | ||
gap: 1.2rem; | ||
|
||
width: 27.8rem; | ||
height: 3.2rem; | ||
} | ||
} | ||
&__trade-button { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 0.6rem 1.6rem; | ||
|
||
width: 18.32rem; | ||
height: 3.2rem; | ||
/* brand/coral */ | ||
|
||
background: #ff444f; | ||
border-radius: 0.4rem; | ||
|
||
&--label { | ||
width: 3.8rem; | ||
height: 2rem; | ||
|
||
font-family: 'IBM Plex Sans'; | ||
font-style: normal; | ||
font-weight: 700; | ||
font-size: 1.4rem; | ||
line-height: 2rem; | ||
/* identical to box height, or 143% */ | ||
|
||
text-align: center; | ||
|
||
/* dark/1 - prominent (text) */ | ||
|
||
color: $color-white; | ||
} | ||
|
||
@include mobile { | ||
padding: 0.3rem 0.8rem; | ||
width: 4.9rem; | ||
height: 2.4rem; | ||
left: 21.9rem; | ||
top: 0.2rem; | ||
|
||
/* brand/coral */ | ||
border-radius: 0.4rem; | ||
|
||
&--label { | ||
width: 3.3rem; | ||
height: 1.8rem; | ||
|
||
font-size: 1.2rem; | ||
line-height: 1.8rem; | ||
} | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
packages/appstore/src/components/platform-launcher/platform-launcher.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import { Button, Text } from '@deriv/components'; | ||
import { Localize } from '@deriv/translations'; | ||
import WalletIcon from 'Assets/svgs/wallet'; | ||
|
||
type TPlatformLauncherProps = { | ||
app_icon: string; | ||
app_title?: string; | ||
app_desc?: string; | ||
}; | ||
|
||
const PlatformLauncher = ({ app_icon, app_title, app_desc }: TPlatformLauncherProps) => { | ||
return ( | ||
<div className='platform-launcher'> | ||
<div className='platform-launcher__container'> | ||
<div className='platform-launcher__container--icon'> | ||
<WalletIcon icon={app_icon} /> | ||
</div> | ||
<div className='platform-launcher__container--title-desc-container'> | ||
ashraf-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Text className='platform-launcher__container--title-desc-container--title' weight='bold'> | ||
ashraf-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Localize i18n_default_text={app_title} /> | ||
</Text> | ||
<Text className='platform-launcher__container--title-desc-container--description'> | ||
ashraf-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Localize i18n_default_text={app_desc} /> | ||
</Text> | ||
</div> | ||
</div> | ||
<div className='platform-launcher__trade-button'> | ||
<Button primary small onClick={undefined} type='button'> | ||
<Localize i18n_default_text='Trade' /> | ||
</Button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PlatformLauncher; |
42 changes: 42 additions & 0 deletions
42
packages/appstore/src/components/platform-launcher/stories/platform-launcher.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from 'react'; | ||
import type { Meta, Story } from '@storybook/react'; | ||
import PlatformLauncher from '../index'; | ||
|
||
type PlatformLauncherProps = Parameters<typeof PlatformLauncher>[0]; | ||
|
||
export default { | ||
title: 'PlatformLauncher', | ||
} as Meta<PlatformLauncherProps>; | ||
|
||
const Template: Story<PlatformLauncherProps> = args => <PlatformLauncher {...args} />; | ||
|
||
export const PlatformLauncherDTrader = Template.bind({}); | ||
PlatformLauncherDTrader.args = { | ||
app_icon: 'DTrader', | ||
app_title: 'DTrader', | ||
app_desc: 'Options & multipliers trading platform.', | ||
}; | ||
export const PlatformLauncherDBot = Template.bind({}); | ||
PlatformLauncherDBot.args = { | ||
app_icon: 'DBot', | ||
app_title: 'DBot', | ||
app_desc: 'Automate your trading, no coding needed.', | ||
}; | ||
export const PlatformLauncherSmartTrader = Template.bind({}); | ||
PlatformLauncherSmartTrader.args = { | ||
app_icon: 'SmartTrader', | ||
app_title: 'SmartTrader', | ||
app_desc: 'Our legacy options trading platform.', | ||
}; | ||
export const PlatformLauncherBinaryBot = Template.bind({}); | ||
PlatformLauncherBinaryBot.args = { | ||
app_icon: 'BinaryBot', | ||
app_title: 'Binary Bot', | ||
app_desc: 'Our legacy automated trading platform.', | ||
}; | ||
export const PlatformLauncherDerivGo = Template.bind({}); | ||
PlatformLauncherDerivGo.args = { | ||
app_icon: 'DerivGo', | ||
app_title: 'DerivGo', | ||
app_desc: 'Trade on the go with our mobile app.', | ||
}; |
1 change: 1 addition & 0 deletions
1
packages/components/src/components/icon/brand/ic-brand-derivgo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 already have all of this icons in the components package, isn't it better to
import {Icon} from '@deriv/components'
in thepackages/appstore/src/components/platform-launcher/platform-launcher.tsx
and use it instead ofWalletIcon
?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.
@mahdiyeh-fs the plugin we use for SVG bundling in '@deriv/components' folder having issue with SVG with gradient property.
But the one we using for wallet folder doesn't have any issue with gradient SVG's that is why we are using it here now.
if we can sort out the issues in the future we can use the same folder.