Closed
Description
What is this: This is a feature request
Description:
Sometimes, putting one component per one file is overkill and hard to maintain, especially when you have a lot of components. Use cases:
- Styled components.
- Private component (Component for local use only)
Allow multiple-component declarations in one file would help a lot.
Proposal Example:
design.svelte
{#def Input}
<input class="input" {...$$props} />
<style>
.input {
background: blue;
}
</style>
{/def}
{#def Button}
<button class="button" {...$$props}>
<slot></slot>
</button>
<style>
.button {
background: blue;
}
</style>
{/def}
app.svelte
<Button>Hi</Button>
<script>
import { Button, Input } from './design.svelte'
</script>
Metadata
Metadata
Assignees
Labels
No labels