import{M as c}from"./chunk-S4VUQJ4A-927bfcdf.js";import{p as i,j as e}from"./jsx-runtime-88f7af0d.js";import{u as l}from"./index-9402fa80.js";import"./iframe-6cba88dd.js";import"../sb-preview/runtime.js";import"./index-f0fbc247.js";import"./_commonjsHelpers-de833af9.js";import"./index-d475d2ea.js";import"./index-d37d4223.js";import"./index-e04ae519.js";import"./index-356e4a49.js";function p(r={}){const{wrapper:s}=Object.assign({},l(),r.components);return s?e.jsx(s,{...r,children:e.jsx(o,{})}):o();function o(){const n=Object.assign({p:"p",img:"img",h1:"h1",h2:"h2",blockquote:"blockquote",a:"a",h3:"h3",h4:"h4",pre:"pre",code:"code",strong:"strong"},l(),r.components);return e.jsxs(e.Fragment,{children:[e.jsx(c,{title:"Contributing/Component guidelines",parameters:{...i}}),` `,e.jsx(n.p,{children:e.jsx(n.img,{src:"https://graphics.thomsonreuters.com/style-assets/images/logos/reuters-graphics-logo/svg/graphics-logo-color-dark.svg",alt:""})}),` `,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",target:"_blank",rel:"nofollow noopener noreferrer",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",target:"_blank",rel:"nofollow noopener noreferrer",children:"JSDoc comments"})," (be sure to mark required props) 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:`