import{j as e}from"./index-bIIEL2MP.js";import{useMDXComponents as o}from"./index-CO-0pc0F.js";import{M as r}from"./index-Z-6k0Xrj.js";import{p as l}from"./docsPage-CT2vyZOj.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./iframe-CzjIX-qr.js";import"./index-aQYXhgXp.js";import"./index-DrFu-skq.js";function s(t){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",strong:"strong",...o(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Contributing/Component guidelines",parameters:{...l}}),` `,e.jsx(n.h1,{id:"component-guidelines",children:"Component guidelines"}),` `,e.jsx(n.h2,{id:"dependencies",children:"Dependencies"}),` `,e.jsx(n.p,{children:"Components should be written for any Svelte context. If your component needs, for example, values from SvelteKit stores, these should be passed in as props."}),` `,e.jsx(n.h2,{id:"typescript",children:"Typescript"}),` `,e.jsx(n.p,{children:"By default, component's are written in TypeScript, which adds robust type-checking and helpful hints for people using your component in editors like Visual Studio Code."}),` `,e.jsxs(n.blockquote,{children:[` `,e.jsxs(n.p,{children:["If you've never used TypeScript, you can check out the ",e.jsx(n.a,{href:"https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html",rel:"nofollow",children:"5-minute intro"}),". If you're still uneasy writing TypeScript, don't sweat it! Just write your component in plain JavaScript/Svelte. We'll convert at least your component's props to TypeScript as part of the PR review."]}),` `]}),` `,e.jsx(n.h3,{id:"typing-and-documenting-component-props",children:"Typing and documenting component props"}),` `,e.jsxs(n.p,{children:["Document props using ",e.jsx(n.a,{href:"https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html",rel:"nofollow",children:"JSDoc comments"})," and type props with TypeScript."]}),` `,e.jsx(n.p,{children:"Here are a few examples:"}),` `,e.jsx(n.h4,{id:"typing-simple-props",children:"Typing simple props"}),` `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-svelte",children:`