remove contentBlock from content component
This commit is contained in:
@@ -21,8 +21,6 @@ const StyledMain =
|
||||
`;
|
||||
|
||||
interface MainProps {
|
||||
title?: string;
|
||||
subtitle?: string;
|
||||
dark?: boolean;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
@@ -30,13 +28,7 @@ interface MainProps {
|
||||
function Main(props: MainProps) {
|
||||
return (
|
||||
<StyledMain dark={props.dark}>
|
||||
<Container>
|
||||
<ContentBlock main title={props.title || 'Get started'}>
|
||||
{props.subtitle ? <Beta as="p">{props.subtitle}</Beta> : null}
|
||||
</ContentBlock>
|
||||
|
||||
{props.children}
|
||||
</Container>
|
||||
<Container>{props.children}</Container>
|
||||
</StyledMain>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -29,13 +29,12 @@ const Item = styled.div`
|
||||
|
||||
const StyledTitle = styled(Alpha)`
|
||||
color: ${props => props.color};
|
||||
margin-bottom: 6.25rem;
|
||||
`;
|
||||
|
||||
interface ContentBlockProps extends Props {
|
||||
title: string;
|
||||
main?: boolean;
|
||||
children: React.ReactNode;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
function ContentBlock(props: ContentBlockProps) {
|
||||
@@ -48,7 +47,7 @@ function ContentBlock(props: ContentBlockProps) {
|
||||
return (
|
||||
<Base>
|
||||
<Title color={props.colors.main}>{props.title}</Title>
|
||||
<Content>{children}</Content>
|
||||
{children ? <Content>{children}</Content> : null}
|
||||
</Base>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ function Compiler() {
|
||||
<Base context={context}>
|
||||
<CompilerComponent />
|
||||
<Content>
|
||||
<ContentBlock main title="Get started" />
|
||||
<ContentBlock title="Required steps">
|
||||
<List items={['Step 1', 'Step 2']} />
|
||||
</ContentBlock>
|
||||
@@ -45,11 +46,14 @@ const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDi
|
||||
</Tabs>
|
||||
</ContentBlock>
|
||||
</Content>
|
||||
<Content
|
||||
title="Artifacts"
|
||||
subtitle="Sol compiler uses solidity standard JSON output format for the artifacts. This way, you can define which parts of the artifact you need."
|
||||
dark
|
||||
>
|
||||
<Content dark>
|
||||
<ContentBlock main title="Artifacts">
|
||||
<p>
|
||||
Sol compiler uses solidity standard JSON output format for the artifacts. This way, you can
|
||||
define which parts of the artifact you need.
|
||||
</p>
|
||||
</ContentBlock>
|
||||
|
||||
<ContentBlock title="Production">
|
||||
<p>
|
||||
Sol compiler uses solidity standard JSON output format for the artifacts. This way, you can
|
||||
|
||||
@@ -22,6 +22,7 @@ function Cov() {
|
||||
</p>
|
||||
</Intro>
|
||||
<Content>
|
||||
<ContentBlock main title="Get started" />
|
||||
<ContentBlock title="Required steps">
|
||||
<List items={['Step 1', 'Step 2']} />
|
||||
</ContentBlock>
|
||||
|
||||
@@ -22,6 +22,7 @@ function Profiler() {
|
||||
</p>
|
||||
</Intro>
|
||||
<Content>
|
||||
<ContentBlock main title="Get started" />
|
||||
<ContentBlock title="Required steps">
|
||||
<List items={['Step 1', 'Step 2']} />
|
||||
</ContentBlock>
|
||||
|
||||
@@ -16,6 +16,7 @@ function Trace() {
|
||||
<Base context={context}>
|
||||
<TraceComponent />
|
||||
<Content>
|
||||
<ContentBlock main title="Get started" />
|
||||
<ContentBlock title="Required steps">
|
||||
<List items={['Step 1', 'Step 2']} />
|
||||
</ContentBlock>
|
||||
|
||||
Reference in New Issue
Block a user