aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAugust Skare <post@augustskare.no>2018-10-18 19:58:07 +0800
committerAugust Skare <post@augustskare.no>2018-10-18 19:58:07 +0800
commitc57c9752a248a2abb3a73e474ee63b1039f9a9c7 (patch)
tree21e22bba618e2f877891182cfc5670906cb8426e /packages
parentb158a6d7226fb50ecedcc07da8ef30e5e5690e46 (diff)
downloaddexon-sol-tools-c57c9752a248a2abb3a73e474ee63b1039f9a9c7.tar
dexon-sol-tools-c57c9752a248a2abb3a73e474ee63b1039f9a9c7.tar.gz
dexon-sol-tools-c57c9752a248a2abb3a73e474ee63b1039f9a9c7.tar.bz2
dexon-sol-tools-c57c9752a248a2abb3a73e474ee63b1039f9a9c7.tar.lz
dexon-sol-tools-c57c9752a248a2abb3a73e474ee63b1039f9a9c7.tar.xz
dexon-sol-tools-c57c9752a248a2abb3a73e474ee63b1039f9a9c7.tar.zst
dexon-sol-tools-c57c9752a248a2abb3a73e474ee63b1039f9a9c7.zip
intro component in profiler view
Diffstat (limited to 'packages')
-rw-r--r--packages/dev-tools-pages/ts/components/Intro.tsx47
-rw-r--r--packages/dev-tools-pages/ts/pages/Profiler.tsx8
2 files changed, 55 insertions, 0 deletions
diff --git a/packages/dev-tools-pages/ts/components/Intro.tsx b/packages/dev-tools-pages/ts/components/Intro.tsx
new file mode 100644
index 000000000..c16c888b7
--- /dev/null
+++ b/packages/dev-tools-pages/ts/components/Intro.tsx
@@ -0,0 +1,47 @@
+import * as React from 'react';
+import styled from 'styled-components';
+
+import { Alpha, Beta } from './Typography';
+
+const Main = styled.div`
+ background-color: #f1f4f5;
+ padding: 6.25rem;
+ display: flex;
+ justify-content: space-between;
+`;
+
+const Title = styled(Alpha)`
+ margin-bottom: 2.5rem;
+`;
+
+const Content = styled.div`
+ max-width: 25.9375rem;
+
+ display: flex;
+ flex-direction: column;
+`;
+
+const Code = styled.div`
+ background-color: #e9eced;
+ width: 520px;
+ height: 350px;
+`;
+
+interface IntroProps {
+ title: string;
+ children: React.ReactNode;
+}
+
+function Intro(props: IntroProps) {
+ return (
+ <Main>
+ <Content>
+ <Title>{props.title}</Title>
+ <Beta as="div">{props.children}</Beta>
+ </Content>
+ <Code />
+ </Main>
+ );
+}
+
+export default Intro;
diff --git a/packages/dev-tools-pages/ts/pages/Profiler.tsx b/packages/dev-tools-pages/ts/pages/Profiler.tsx
index ad2219c5e..d129d6427 100644
--- a/packages/dev-tools-pages/ts/pages/Profiler.tsx
+++ b/packages/dev-tools-pages/ts/pages/Profiler.tsx
@@ -9,11 +9,19 @@ import { Tabs, TabBlock } from 'ts/components/Tabs';
import Code from 'ts/components/Code';
import InlineCode from 'ts/components/InlineCode';
import List from 'ts/components/List';
+import Intro from 'ts/components/Intro';
function Profiler(props: any) {
return (
<Base context={context}>
<Container>
+ <Intro title="ra">
+ <p>
+ Sol-profiler gathers line-by-line gas usage for any transaction submitted through your provider.
+ This will help you find unexpected inefficiencies in parts of your smart contract, and take a
+ data-driven approach to optimizing it.
+ </p>
+ </Intro>
<Main>
<ContentBlock title="Required steps">
<List items={['Step 1', 'Step 2']} />