-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
106 changed files
with
1,409 additions
and
665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* eslint-disable react/jsx-props-no-spreading */ | ||
import React from 'react'; | ||
import classnames from 'classnames'; | ||
import { sampleSectionIdAndClasses } from './utils'; | ||
|
||
const tabs = ['Tab 1', 'Tab 2', 'Tab 3']; | ||
|
||
function Tab({ | ||
isActive, | ||
title, | ||
}: { | ||
isActive: boolean; | ||
title: string; | ||
}): JSX.Element { | ||
return ( | ||
<li className={classnames('lm_tab', isActive && 'lm_active')}> | ||
<span className="lm_title_before" /> | ||
<span className="lm_title">{title}</span> | ||
<span className="lm_close_tab" /> | ||
</li> | ||
); | ||
} | ||
|
||
export function GoldenLayout(): JSX.Element { | ||
return ( | ||
<div {...sampleSectionIdAndClasses('golden-layout')}> | ||
<h2 className="ui-title">Golden Layout</h2> | ||
{[false, true].map(isMaximised => ( | ||
<React.Fragment key={String(isMaximised)}> | ||
<h5>{isMaximised ? 'Minimized' : 'Maximised'}</h5> | ||
<div | ||
style={{ position: 'relative', border: 'none' }} | ||
className={isMaximised ? 'lm_maximised' : undefined} | ||
> | ||
<div className="lm_header"> | ||
<ul className="lm_tabs"> | ||
{tabs.map((tab, i) => ( | ||
<Tab key={tab} isActive={i === 0} title={tab} /> | ||
))} | ||
</ul> | ||
<ul className="lm_controls"> | ||
<li className="lm_tabpreviousbutton" /> | ||
<li className="lm_tabnextbutton" /> | ||
<li className="lm_maximise" /> | ||
<li className="lm_popout" /> | ||
<li className="lm_tabdropdown" /> | ||
<li className="lm_close" /> | ||
</ul> | ||
</div> | ||
</div> | ||
</React.Fragment> | ||
))} | ||
</div> | ||
); | ||
} | ||
|
||
export default GoldenLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.