diff options
author | Fabio Berger <me@fabioberger.com> | 2018-11-16 21:52:20 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-11-16 21:52:20 +0800 |
commit | 25d0b1e6e58987d0f00a5034158c2c514cf476d6 (patch) | |
tree | 412ef07e713fd928b856aca2fc603e182adcd1d3 /packages/instant/src/components/standard_panel_content.tsx | |
parent | e36fc4e6aef414c5d3507c59d82e03e92fbc93fb (diff) | |
parent | cabb7432b9a6d4a5bb8da6fc7fe4522d24e4ece5 (diff) | |
download | dexon-sol-tools-25d0b1e6e58987d0f00a5034158c2c514cf476d6.tar dexon-sol-tools-25d0b1e6e58987d0f00a5034158c2c514cf476d6.tar.gz dexon-sol-tools-25d0b1e6e58987d0f00a5034158c2c514cf476d6.tar.bz2 dexon-sol-tools-25d0b1e6e58987d0f00a5034158c2c514cf476d6.tar.lz dexon-sol-tools-25d0b1e6e58987d0f00a5034158c2c514cf476d6.tar.xz dexon-sol-tools-25d0b1e6e58987d0f00a5034158c2c514cf476d6.tar.zst dexon-sol-tools-25d0b1e6e58987d0f00a5034158c2c514cf476d6.zip |
Merge branch 'development' into launchKitLanding
* development: (110 commits)
fix: fix exceeds block gas limit error
chore(instant): fix lint error
fix: remove unused vars
Send in affiliate info as option
Have heartbeat update not trigger errors
fix: remove redundant handler
feat: make onUnlockWalletClick different based on ON
chore: remove wallet panel content for mobile
feat: use blue for wallet prompt on mobile
feat: use stable version of bowser
fix: add http to external url string
feat: make onUnlockWalletClick different based on ON
chore: remove wallet panel content for mobile
feat: use blue for wallet prompt on mobile
feat: use stable version of bowser
feat: expose webpack-dev-server content to local network
fix(website): remove node env definition from webpack
fix(website): currentProvider called on undefined
chore: update yarn lock
feat: use capital values for enums
...
Diffstat (limited to 'packages/instant/src/components/standard_panel_content.tsx')
-rw-r--r-- | packages/instant/src/components/standard_panel_content.tsx | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/packages/instant/src/components/standard_panel_content.tsx b/packages/instant/src/components/standard_panel_content.tsx new file mode 100644 index 000000000..582b3318e --- /dev/null +++ b/packages/instant/src/components/standard_panel_content.tsx @@ -0,0 +1,62 @@ +import * as React from 'react'; + +import { ColorOption } from '../style/theme'; + +import { Container } from './ui/container'; +import { Flex } from './ui/flex'; +import { Text } from './ui/text'; + +export interface MoreInfoSettings { + text: string; + href: string; +} + +export interface StandardPanelContentProps { + image: React.ReactNode; + title?: string; + description: string; + moreInfoSettings?: MoreInfoSettings; + action: React.ReactNode; +} + +const SPACING_BETWEEN_PX = '20px'; + +export const StandardPanelContent: React.StatelessComponent<StandardPanelContentProps> = ({ + image, + title, + description, + moreInfoSettings, + action, +}) => ( + <Container height="100%"> + <Flex direction="column" height="calc(100% - 58px)"> + <Container marginBottom={SPACING_BETWEEN_PX}>{image}</Container> + {title && ( + <Container marginBottom={SPACING_BETWEEN_PX}> + <Text fontSize="20px" fontWeight={700} fontColor={ColorOption.black}> + {title} + </Text> + </Container> + )} + <Container marginBottom={SPACING_BETWEEN_PX}> + <Text fontSize="14px" fontColor={ColorOption.grey} center={true}> + {description} + </Text> + </Container> + <Container marginBottom={SPACING_BETWEEN_PX}> + {moreInfoSettings && ( + <Text + center={true} + fontSize="13px" + textDecorationLine="underline" + fontColor={ColorOption.lightGrey} + href={moreInfoSettings.href} + > + {moreInfoSettings.text} + </Text> + )} + </Container> + </Flex> + <Container>{action}</Container> + </Container> +); |