docs: v5 demo add star link (#4604)

This commit is contained in:
Yanyan Wang 2023-06-08 13:41:19 +08:00 committed by GitHub
parent 5d81efdbe6
commit 96e36f2c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 13 deletions

View File

@ -13,10 +13,17 @@ const LargeGraph: React.FC = () => {
<>
<Header />
{ activeDemo === 'demo1' ? <LargeDemoPage language='zh' /> : <SmallDemoPage language='zh' />}
<a
style={{ position: 'absolute', top: '86px', right: '24px', width: '135px', textAlign: 'center' }}
href='http://github.com/antvis/g6'
target='_blank'
>
{'GitHub Star 鼓励 ❤️'}
</a>
<select
className='v5-demos'
onChange={handleChangeDemo}
style={{ position: 'absolute', top: '90px', right: '24px', width: '135px' }}
style={{ position: 'absolute', top: '120px', right: '24px', width: '135px' }}
>
<option value="demo1"> DEMO(7167 nodes)</option>
<option value="demo2"> DEMO</option>

View File

@ -196,15 +196,19 @@ const V5Controller = (props) => {
return (
<div className='v5-controller'>
<div className='v5-buttons'>
<button className='v5-button' onClick={handleFullScreen}>
<button
className='v5-button'
onClick={handleFullScreen}
style={{ width: '100%', background: 'rgba(34,126,255,0.3)' }}
>
{language === 'zh' ? '全屏' : 'Fullscreen'}
</button>
<button className='v5-button' onClick={() => handleZoom(true)}>
{/* <button className='v5-button' onClick={() => handleZoom(true)}>
{language === 'zh' ? '放大' : 'ZoomIn'}
</button>
<button className='v5-button' onClick={() => handleZoom(false)}>
{language === 'zh' ? '缩小' : 'ZoomOut'}
</button>
</button> */}
</div>
<select
className='v5-select'

View File

@ -20,7 +20,7 @@
.v5-controller {
position: absolute;
right: 16px;
top: 116px;
top: 140px;
padding: 8px;
width: fit-content;
height: fit-content;
@ -31,14 +31,14 @@
border: 1px solid #227EFF;
text-align: center;
}
.v5-buttons {
:first-child {
margin-right: 4px;
}
:last-child {
margin-left: 4px;
}
}
// .v5-buttons {
// :first-child {
// margin-right: 4px;
// }
// :last-child {
// margin-left: 4px;
// }
// }
.v5-select {
width: 135px;
margin-top: 8px;