Created
February 16, 2016 12:33
-
-
Save zindel/af4aa58c1aa0502b9411 to your computer and use it in GitHub Desktop.
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
function LaunchButton({url, text, attachLeft = false, attachRight = false}) { | |
return (!url ? null : | |
<ui.Button | |
size="small" | |
attach={{left: attachLeft, right: attachRight}}> | |
<Link href={url} target="_blank"> | |
{text} | |
</Link> | |
</ui.Button> | |
); | |
} | |
function SourceLauncher({inspectUrl, wizardSource, actionSource}) { | |
return ( | |
<div style={{ | |
position: 'absolute', | |
top: 5, | |
right: 5, | |
zIndex: 9999, | |
}}> | |
<LaunchButton | |
url={inspectUrl} | |
attachRight={wizardSource || actionSource} | |
text="Inspect" | |
/> | |
<LaunchButton | |
url={wizardSource} | |
attachLeft={inspectUrl} | |
attachRight={actionSource} | |
text="Wizard Source" | |
/> | |
<LaunchButton | |
url={actionSource} | |
attachLeft={inspectUrl || wizardSource} | |
text="Action Source" | |
/> | |
</div> | |
); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment