style tweaks to make Share popover match Figma a bit closer.

This commit is contained in:
Frank Johnson
2021-08-23 22:16:47 -04:00
parent b4cdd3e1ef
commit 6be2ced06f
5 changed files with 15 additions and 13 deletions

View File

@@ -1,2 +0,0 @@
# DATABASE_URL=file:./dev.db
# BINARY_TARGET=native

View File

@@ -53,7 +53,7 @@ const ExternalScript = () => {
} }
return ( return (
<div className="p-4"> <div className="p-4">
<p className="text-sm pb-4"> <p className="text-sm pb-4 border-b border-gray-700">
Paste an external url containing a {cadName} script to generate a new Paste an external url containing a {cadName} script to generate a new
CadHub url for this resource.{' '} CadHub url for this resource.{' '}
<OutBound <OutBound
@@ -66,9 +66,9 @@ const ExternalScript = () => {
</p> </p>
{['INIT', 'ERROR'].includes(asyncState) && ( {['INIT', 'ERROR'].includes(asyncState) && (
<> <>
<p>Paste url</p> <p className="mt-4">Paste url</p>
<input <input
className="p-1 text-xs rounded border border-gray-700 w-full" className="p-1 text-xs border border-ch-purple-450 w-full"
value={rawUrl} value={rawUrl}
onChange={onChange} onChange={onChange}
onPaste={onPaste} onPaste={onPaste}
@@ -91,23 +91,23 @@ const ExternalScript = () => {
<input <input
value={makeExternalUrl(rawUrl).replace(/^.+:\/\//g, '')} value={makeExternalUrl(rawUrl).replace(/^.+:\/\//g, '')}
readOnly readOnly
className="p-1 mt-4 text-xs rounded-t border border-gray-700 w-full" className="py-1 px-2 mt-4 text-xs border border-ch-purple-450 w-full"
/> />
<button <button
className="w-full bg-gray-700 py-1 rounded-b text-gray-300" className="w-full bg-ch-purple-450 hover:bg-ch-purple-400 py-1 text-gray-300"
onClick={() => copyTextToClipboard(makeExternalUrl(rawUrl))} onClick={() => copyTextToClipboard(makeExternalUrl(rawUrl))}
> >
Copy URL Copy URL
</button> </button>
<div className="flex flex-col gap-2 pt-2"> <div className="flex flex-col gap-2 pt-2">
<button <button
className="bg-gray-500 p-1 px-2 rounded text-gray-300" className="bg-gray-500 hover:bg-gray-600 p-1 px-2 text-gray-200"
onClick={onCopyRender} onClick={onCopyRender}
> >
Copy &amp; Render Copy &amp; Render
</button> </button>
<button <button
className="bg-gray-500 p-1 px-2 rounded text-gray-300" className="bg-gray-500 hover:bg-gray-600 p-1 px-2 text-gray-200"
onClick={() => { onClick={() => {
setAsyncState('INIT') setAsyncState('INIT')
setRawUrl('') setRawUrl('')

View File

@@ -13,10 +13,10 @@ const FullScriptEncoding = () => {
<input <input
value={encodedLink.replace(/^.+:\/\//g, '')} value={encodedLink.replace(/^.+:\/\//g, '')}
readOnly readOnly
className="p-1 mt-4 text-xs rounded-t border border-gray-700 w-full" className="py-1 px-2 mt-4 text-xs border border-ch-purple-450 w-full"
/> />
<button <button
className="w-full bg-gray-700 py-1 rounded-b text-gray-300" className="w-full bg-ch-purple-450 hover:bg-ch-purple-400 py-1 rounded-b text-gray-300"
onClick={() => copyTextToClipboard(encodedLink)} onClick={() => copyTextToClipboard(encodedLink)}
> >
Copy URL Copy URL

View File

@@ -152,8 +152,8 @@ const IdeHeader = ({
{open && ( {open && (
<Popover.Panel className="absolute z-10 mt-4 right-0"> <Popover.Panel className="absolute z-10 mt-4 right-0">
<Tabs <Tabs
className="bg-gray-300 rounded-md shadow-md overflow-hidden text-gray-700" className="bg-ch-purple-gray-200 rounded-md shadow-md overflow-hidden text-gray-700"
selectedTabClassName="bg-gray-200" selectedTabClassName="bg-ch-gray-700 text-white"
> >
<TabPanel> <TabPanel>
<FullScriptEncoding /> <FullScriptEncoding />

View File

@@ -27,9 +27,13 @@ module.exports = {
}, },
'ch-purple': { 'ch-purple': {
400: '#3B0480', 400: '#3B0480',
450: '#671BC6',
500: '#8732F2', 500: '#8732F2',
600: '#A663FA', 600: '#A663FA',
}, },
'ch-purple-gray': {
200: '#DBDBEC',
},
'ch-blue': { 'ch-blue': {
600: '#79B2F8', 600: '#79B2F8',
500: '5098F1', 500: '5098F1',