Run linting

related to #360
This commit is contained in:
Kurt Hutten
2021-06-13 06:33:03 +10:00
parent d781c94027
commit da81942adc
13 changed files with 258 additions and 209 deletions

View File

@@ -3,7 +3,7 @@ import { Menu } from '@headlessui/react'
import { useIdeContext } from 'src/helpers/hooks/useIdeContext'
import Svg from 'src/components/Svg/Svg'
import { useRender } from 'src/components/IdeWrapper/useRender'
import {makeStlDownloadHandler, PullTitleFromFirstLine} from './helpers'
import { makeStlDownloadHandler, PullTitleFromFirstLine } from './helpers'
const EditorMenu = () => {
const handleRender = useRender()
@@ -17,16 +17,16 @@ const EditorMenu = () => {
return (
<div className="bg-gray-500 flex items-center h-9 w-full cursor-grab">
<div className=" text-gray-500 bg-gray-300 cursor-grab px-2 h-full flex items-center">
<Svg name='drag-grid' className="w-4 p-px" />
<Svg name="drag-grid" className="w-4 p-px" />
</div>
<button
className="text-gray-300 px-3 h-full cursor-not-allowed"
aria-label="editor settings"
disabled
>
<Svg name='gear' className="w-7 p-px" />
<Svg name="gear" className="w-7 p-px" />
</button>
<div className="w-px h-full bg-gray-300"/>
<div className="w-px h-full bg-gray-300" />
<div className="flex gap-6 px-6">
<FileDropdown
handleRender={handleRender}
@@ -45,7 +45,7 @@ const EditorMenu = () => {
export default EditorMenu
function FileDropdown({handleRender, handleStlDownload}) {
function FileDropdown({ handleRender, handleStlDownload }) {
return (
<Menu>
<Menu.Button className="text-gray-100">File</Menu.Button>
@@ -56,11 +56,20 @@ function FileDropdown({handleRender, handleStlDownload}) {
className={`${active && 'bg-gray-600'} px-2 py-1`}
onClick={handleRender}
>
Save &amp; Render <span className="text-gray-400 pl-4">{
/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ?
<><Svg name="mac-cmd-key" className="h-3 w-3 inline-block text-left" />S</> :
'Ctrl S'
}</span>
Save &amp; Render{' '}
<span className="text-gray-400 pl-4">
{/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? (
<>
<Svg
name="mac-cmd-key"
className="h-3 w-3 inline-block text-left"
/>
S
</>
) : (
'Ctrl S'
)}
</span>
</button>
)}
</Menu.Item>