-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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>btakita, wysher, itswillta, MVSICA-FICTA, ktquez and 133 moremaxmilton, dhonx, PaulMaly, aubergene, lucavenir and 8 moresteida, siduck, godzzo and bhupeshpr25PaulMaly, siduck and chientrmshahul01
Metadata
Metadata
Assignees
Labels
No labels