Commit 9f412e19 authored by Aral Balkan's avatar Aral Balkan
Browse files

Remove earlier component test sections

parent b59344cf
import SetupSection from './sections/Setup.svelte'
import HomeSection from './sections/Home.svelte'
import AboutSection from './sections/About.svelte'
import SlidingSection from './sections/Sliding.svelte'
import SwitchSection from './sections/Switch.svelte'
import PrivateSection from './sections/Private.svelte'
import SignInSection from './sections/SignIn.svelte'
import SignOutSection from './sections/SignOut.svelte'
......@@ -23,8 +21,6 @@ signedIn.subscribe(value => {
export const sections = [
{ path: '/', title: 'Home', route: HomeSection},
{ path: '/about', title: 'About', route: AboutSection},
{ path: '/sliding', title: 'Sliding', route: SlidingSection},
{ path: '/switch', title: 'Switch', route: SwitchSection},
{ path: '/sign-in', title: 'Sign in', route: SignInSection},
{ path: '/sign-out', title: 'Sign out', route: SignOutSection, isPrivate: true},
{ path: '/private', title: 'Private', route: PrivateSection, isPrivate: true},
......
<script>
import Section from './Section.svelte'
import { slide } from 'svelte/transition'
let show = true
</script>
<Section path='/sliding' title='A little sliding thing'>
{#if show}
<div transition:slide={show}>
<hr>
<h3>Hello, I am here!</h3>
<hr>
</div>
{/if}
<button on:click={() => show = !show}>Toggle visibility</button>
</Section>
<script>
// @hmr:reset
import Section from './Section.svelte'
import Switch from 'svelte-switch'
let checkedValue = true;
function handleChange(e) {
const { checked } = e.detail;
checkedValue = checked;
}
</script>
<style>
p { font-size: 1.4em; }
</style>
<Section path='/switch' title='An npm-installed switch component'>
<Switch on:change={handleChange} checked={checkedValue} />
<br/>
<p>The switch is <strong>{checkedValue ? 'on' : 'off'}</strong>.</p>
</Section>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment