mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-26 00:16:51 +00:00
Project tree view and creation (#203)
* Implement creating and importing new projects * Add downloading a zip of a project * Project validation (WIP) * Add project side panel, remove project pages * Project file saving * Add file tree actions to rename and delete * Fix file creation auto focus * Add button to save file from menu * Add project creation * Fix specificity on version switcher button * Update default version to 1.19 * List project files by type, remember project and delete project
This commit is contained in:
21
src/app/components/BtnLink.tsx
Normal file
21
src/app/components/BtnLink.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Octicon } from '.'
|
||||
|
||||
interface Props {
|
||||
link?: string,
|
||||
icon?: keyof typeof Octicon,
|
||||
label?: string,
|
||||
tooltip?: string,
|
||||
tooltipLoc?: 'se' | 'sw' | 'nw',
|
||||
swapped?: boolean,
|
||||
}
|
||||
export function BtnLink({ link, icon, label, tooltip, tooltipLoc, swapped }: Props) {
|
||||
return <a {...link ? { href: link } : { disabled: true }} class={`btn btn-link${tooltip ? ` tooltipped tip-${tooltipLoc ?? 'sw'}` : ''}`} aria-label={tooltip}>
|
||||
{swapped ? <>
|
||||
{label && <span>{label}</span>}
|
||||
{icon && Octicon[icon]}
|
||||
</> : <>
|
||||
{icon && Octicon[icon]}
|
||||
{label && <span>{label}</span>}
|
||||
</>}
|
||||
</a>
|
||||
}
|
||||
Reference in New Issue
Block a user