Skip to content

Commit

Permalink
fix typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
angryziber committed Aug 17, 2023
1 parent 37fe0e1 commit 69f5cf9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
7 changes: 2 additions & 5 deletions src/config/Accordion.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
import {createEventDispatcher} from 'svelte'
import {slide} from 'svelte/transition'
export let heading
export let className
export let heading: string
export let className: string
export let isOpen = false
const dispatch = createEventDispatcher()
const toggle = () => dispatch('toggle', className)
</script>

<div class="shadow mb-3 rounded-3 overflow-hidden {className}">

<h2 class="accordion-header">
<button on:click={toggle} class:collapsed={!isOpen} class="accordion-button p-lg-4" type="button">
{heading}
Expand All @@ -25,5 +23,4 @@
<slot />
</div>
{/if}

</div>
19 changes: 9 additions & 10 deletions src/config/ProjectImportList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,38 @@
import GitHubProjectImporter from './GitHubProjectImporter.svelte'
import BitBucketProjectImporter from './BitBucketProjectImporter.svelte'
import Accordion from './Accordion.svelte'
import {SvelteComponent} from 'svelte'
import type {SvelteComponent} from 'svelte'
import {fly} from 'svelte/transition'
import Card from '../components/Card.svelte'
import AwsCodeCommitImporter from './AwsCodeCommitImporter.svelte'
interface Accordion {
title: string,
className: string,
component: SvelteComponent,
component: new (...args: any) => SvelteComponent,
isOpen?: boolean
}
let importers = [
{ title: 'Via GitHub', className: 'githubImport', component: GitHubProjectImporter },
{ title: 'Via BitBucket', className: 'bitbucketImport', component: BitBucketProjectImporter },
{ title: 'Via Public URL', className: 'publicImport', isOpen: true, component: SimpleProjectImporter },
{ title: 'Via AWS CodeCommit', className: 'awsCodeCommitImport', component: AwsCodeCommitImporter },
{title: 'Via GitHub', className: 'githubImport', component: GitHubProjectImporter},
{title: 'Via BitBucket', className: 'bitbucketImport', component: BitBucketProjectImporter},
{title: 'Via Public URL', className: 'publicImport', isOpen: true, component: SimpleProjectImporter},
{title: 'Via AWS CodeCommit', className: 'awsCodeCommitImport', component: AwsCodeCommitImporter},
] as Accordion[]
function toggle(e) {
function toggle(e: CustomEvent) {
importers.forEach(i => i.isOpen = i.className === e.detail && i.isOpen !== true)
importers = importers
}
</script>

<div class="accordion import addNew fix-width mx-auto" in:fly={{x: -200, duration: 200}}>

<h3 class="mb-3">New project</h3>
<Card padding="px-4 py-3" class="mb-3">
<div>
<h5><i class="fa-solid fa-circle-info mb-3 me-2"></i>Quickstart</h5>
<p>Make sure to acquaint yourself with the desired <a target="_blank" href="https://github.com/codeborne/translate-tool#using-the-tool">file structure</a></p>
<p>A working example project can be found <a target="_blank" href="https://github.com/codeborne/translate-tool/tree/master/e2e/i18n">here</a></p>
<p>Make sure to acquaint yourself with the required <a target="_blank" href="https://github.com/codeborne/translate-tool#using-the-tool">file structure</a></p>
<p>A working example files can be found <a target="_blank" href="https://github.com/codeborne/translate-tool/tree/master/e2e/i18n">here</a></p>
</div>
</Card>

Expand Down

0 comments on commit 69f5cf9

Please sign in to comment.