Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
tweak example container size
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Nov 5, 2019
1 parent a8997e5 commit d7d9d14
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
16 changes: 14 additions & 2 deletions @antv/gatsby-theme-antv/site/components/PlayGround.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
border-radius: 4px;
display: flex;
background: #fff;
min-height: @editor-height;
height: @editor-height;
overflow: hidden;

.preview,
Expand All @@ -20,7 +20,7 @@
border-right: 1px solid #efefef;
padding: 24px 16px;
overflow: auto;
min-height: @editor-height;
height: 100%;
}

.editor {
Expand Down Expand Up @@ -78,4 +78,16 @@
}
}
}

.exampleContainerWrapper {
height: 100%;
display: flex;
justify-content: center;
align-items: center;

> * {
width: 100%;
height: 100%;
}
}
}
2 changes: 1 addition & 1 deletion @antv/gatsby-theme-antv/site/components/PlayGround.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const PlayGround: React.FC<PlayGroundProps> = ({
subTitle={<pre>{error && error.message}</pre>}
/>
) : (
<div ref={playpround} />
<div ref={playpround} className={styles.exampleContainerWrapper} />
)}
</div>
<div className={styles.editor}>
Expand Down
2 changes: 1 addition & 1 deletion example/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ module.exports = {
},
},
],
exampleContainer: '<canvas id="container" class="ok" />',
exampleContainer: '<div id="container" class="ok" />',
},
};

0 comments on commit d7d9d14

Please sign in to comment.