Anvil/assets/Configure-393cb357.js

174 lines
18 KiB
JavaScript
Raw Normal View History

2024-02-09 21:15:08 +01:00
import{d as p,M as b}from"./index-43eea83a.js";import{u as c}from"./index-3211bf66.js";import"./iframe-816972a2.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-725317a4.js";import"./index-11d98b33.js";import"./index-a04a29e8.js";import"./index-356e4a49.js";var m={exports:{}},a={};/**
2024-02-08 10:52:22 +01:00
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var x=p,u=Symbol.for("react.element"),j=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,R=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function h(t,s,d){var o,r={},n=null,l=null;d!==void 0&&(n=""+d),s.key!==void 0&&(n=""+s.key),s.ref!==void 0&&(l=s.ref);for(o in s)f.call(s,o)&&!y.hasOwnProperty(o)&&(r[o]=s[o]);if(t&&t.defaultProps)for(o in s=t.defaultProps,s)r[o]===void 0&&(r[o]=s[o]);return{$$typeof:u,type:t,key:n,ref:l,props:r,_owner:R.current}}a.Fragment=j;a.jsx=h;a.jsxs=h;m.exports=a;var e=m.exports;const w=""+new URL("github-cdfc3270.svg",import.meta.url).href,v=""+new URL("discord-f7d1b78c.svg",import.meta.url).href,E=""+new URL("youtube-9f26eb0b.svg",import.meta.url).href,k=""+new URL("tutorials-adff6365.svg",import.meta.url).href,I=""+new URL("styling-c83082e0.png",import.meta.url).href,A=""+new URL("context-c612d889.png",import.meta.url).href,N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkQAAAEECAMAAAD+jtuZAAAA1VBMVEUAAAC97a687K687K697K697a687a697K+87K6/76+87K7///831dPd9ddmvzyc24PE7riR1XWH0GdxxUru+utxxEr3/fXl+OHN9fTA7bNQ2tn7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9KxE+dDUKmb7T3HWTYViVT24/dCV2Q/ouzf+wkUMBHd5a/4G1GvbzoEfYjVQ1C5eDtHd7PiROrWaB9kvIeInktSwUSU/cZpBeBvRGbrIN3S24x/vRNNC78gOstr0tWxHFH+5wsoYCLa5I14HNFc6JsWh6CPBj/2aSTEj91CWiJTidDVthrR83A4fC6bqzERZT9yPEx99jWiidB2Vljp0JfIzMmJ/J1ObHTzEdmMaGcFCqiIWv5+eTFncPMR50PQ9oM8or7dr4c+GK6D7CMiUEFF9OB9RAuh6V6mRgJjumsIuQ5iLaLWb6CCimjV2lG14kFEc5MSbgXO6FSmTruFdZCuwVAUghsaERnzIKLQJKKZwPrYXb+eo07N1kE4IrQGuBAJLcUjCA+1DjLgiHBcRTQQeopHEB5qHYQjwnEV0YXQoDiC8BDrIBwRjquIeogjqLpTs5sPjgirAU608UcQXn4Zq20JbnBESAP8EYS3NlsHmYMbHBHSpPoRtO6+fyO+tao8sy/CtsENjgip1694BHWzC5FpUvZTaS7xVPxpZjQU9XvgBEeE1a52BCXyl3gkVEaKVxHrIBNwgiPCmgsV7SMo3t3ur4Uof/U2EVuIdZABOMERYS2Fmt4RNJK/zf6qYqp8dbcOQm8o4oiQTIaiWBS9j+VrU+VRJxVn2gezC90euMARoXVM1suSsrca1fAz+/PVe7F1b3YXdw0ucERoc6FBfQQl8i83SXEUL5olhbs4ckMRR4QUCg3qI2gmc+pQYqkwTV81/yJsBC5wRHiR0KA6grpSKZ4WZm
`,e.jsxs("div",{className:"sb-container",children:[e.jsxs("div",{className:"sb-section-title",children:[e.jsx(s.h1,{id:"configure-your-project",children:"Configure your project"}),e.jsx(s.p,{children:"Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community."})]}),e.jsxs("div",{className:"sb-section",children:[e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:I,alt:"A wall of logos representing different styling technologies"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Add styling and CSS"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook."}),e.jsxs("a",{href:"https://storybook.js.org/docs/svelte/configure/styling-and-css",target:"_blank",children:["Learn more",e.jsx(i,{})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:A,alt:"An abstraction representing the composition of data for a component"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Provide context and mocking"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available."}),e.jsxs("a",{href:"https://storybook.js.org/docs/svelte/writing-stories/decorators#context-for-mocking",target:"_blank",children:["Learn more",e.jsx(i,{})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:N,alt:"A representation of typography and image assets"}),e.jsxs("div",{children:[e.jsx("h4",{className:"sb-section-item-heading",children:"Load assets and resources"}),e.jsxs("p",{className:"sb-section-item-paragraph",children:[`To link static files (like fonts) to your projects and stories, use the
`,e.jsx(s.code,{children:"staticDirs"}),` configuration option to specify folders to load when
starting Storybook.`]}),e.jsxs("a",{href:"https://storybook.js.org/docs/svelte/configure/images-and-assets",target:"_blank",children:["Learn more",e.jsx(i,{})]})]})]})]})]}),`
`,e.jsxs("div",{className:"sb-container",children:[e.jsxs("div",{className:"sb-section-title",children:[e.jsx(s.h1,{id:"do-more-with-storybook",children:"Do more with Storybook"}),e.jsx(s.p,{children:"Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs."})]}),e.jsx("div",{className:"sb-section",children:e.jsxs("div",{className:"sb-features-grid",children:[e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:C,alt:"A screenshot showing the autodocs tag being set, pointing a docs page being generated"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Autodocs"}),e.jsx("p",{className:"sb-section-item-paragraph",children:`Auto-generate living,
interactive reference documentation from your components and stories.`}),e.jsxs("a",{href:"https://storybook.js.org/docs/svelte/writing-docs/autodocs",target:"_blank",children:["Learn more",e.jsx(i,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:B,alt:"A browser window showing a Storybook being published to a chromatic.com URL"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Publish to Chromatic"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Publish your Storybook to review and collaborate with your entire team."}),e.jsxs("a",{href:"https://storybook.js.org/docs/svelte/sharing/publish-storybook#publish-storybook-with-chromatic",target:"_blank",children:["Learn more",e.jsx(i,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:U,alt:"Windows showing the Storybook plugin in Figma"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Figma Plugin"}),e.jsx("p",{className:"sb-section-item-paragraph",children:`Embed your stories into Figma to cross-reference the design and live
implementation in one place.`}),e.jsxs("a",{href:"https://storybook.js.org/docs/svelte/sharing/design-integrations#embed-storybook-in-figma-with-the-plugin",target:"_blank",children:["Learn more",e.jsx(i,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:F,alt:"Screenshot of tests passing and failing"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Testing"}),e.jsx("p",{className:"sb-section-item-paragraph",children:`Use stories to test a component in all its variations, no matter how
complex.`}),e.jsxs("a",{href:"https://storybook.js.org/docs/svelte/writing-tests",target:"_blank",children:["Learn more",e.jsx(i,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:S,alt:"Screenshot of accessibility tests passing and failing"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Accessibility"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Automatically test your components for a11y issues as you develop."}),e.jsxs("a",{href:"https://storybook.js.org/docs/svelte/writing-tests/accessibility-testing",target:"_blank",children:["Learn more",e.jsx(i,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:Q,alt:"Screenshot of Storybook in light and dark mode"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Theming"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Theme Storybook's UI to personalize it to your project."}),e.jsxs("a",{href:"https://storybook.js.org/docs/svelte/configure/theming",target:"_blank",children:["Learn more",e.jsx(i,{})]})]})]})})]}),`
`,e.jsxs("div",{className:"sb-addon",children:[e.jsxs("div",{className:"sb-addon-text",children:[e.jsx("h4",{children:"Addons"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Integrate your tools with Storybook to connect workflows."}),e.jsxs("a",{href:"https://storybook.js.org/integrations/",target:"_blank",children:["Discover all addons",e.jsx(i,{})]})]}),e.jsx("div",{className:"sb-addon-img",children:e.jsx("img",{src:L,alt:"Integrate your tools with Storybook to connect workflows."})})]}),`
`,e.jsxs("div",{className:"sb-section sb-socials",children:[e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:w,alt:"Github logo",className:"sb-explore-image"}),e.jsx(s.p,{children:"Join our contributors building the future of UI development."}),e.jsxs("a",{href:"https://github.com/storybookjs/storybook",target:"_blank",children:["Star on GitHub",e.jsx(i,{})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:v,alt:"Discord logo",className:"sb-explore-image"}),e.jsxs("div",{children:[e.jsx(s.p,{children:"Get support and chat with frontend developers."}),e.jsxs("a",{href:"https://discord.gg/storybook",target:"_blank",children:["Join Discord server",e.jsx(i,{})]})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:E,alt:"Youtube logo",className:"sb-explore-image"}),e.jsxs("div",{children:[e.jsx(s.p,{children:"Watch tutorials, feature previews and interviews."}),e.jsxs("a",{href:"https://www.youtube.com/@chromaticui",target:"_blank",children:["Watch on YouTube",e.jsx(i,{})]})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:k,alt:"A book",className:"sb-explore-image"}),e.jsx("p",{children:"Follow guided walkthroughs on for key workflows."}),e.jsxs("a",{href:"https://storybook.js.org/tutorials/",target:"_blank",children:["Discover tutorials",e.jsx(i,{})]})]})]}),`
`,e.jsx("style",{children:`
.sb-container {
margin-bottom: 48px;
}
.sb-section {
width: 100%;
display: flex;
flex-direction: row;
gap: 20px;
}
img {
object-fit: cover;
}
.sb-section-title {
margin-bottom: 32px;
}
.sb-section a:not(h1 a, h2 a, h3 a) {
font-size: 14px;
}
.sb-section-item, .sb-grid-item {
flex: 1;
display: flex;
flex-direction: column;
}
.sb-section-item-heading {
padding-top: 20px !important;
padding-bottom: 5px !important;
margin: 0 !important;
}
.sb-section-item-paragraph {
margin: 0;
padding-bottom: 10px;
}
.sb-chevron {
margin-left: 5px;
}
.sb-features-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 32px 20px;
}
.sb-socials {
display: grid;
grid-template-columns: repeat(4, 1fr);
}
.sb-socials p {
margin-bottom: 10px;
}
.sb-explore-image {
max-height: 32px;
align-self: flex-start;
}
.sb-addon {
width: 100%;
display: flex;
align-items: center;
position: relative;
background-color: #EEF3F8;
border-radius: 5px;
border: 1px solid rgba(0, 0, 0, 0.05);
background: #EEF3F8;
height: 180px;
margin-bottom: 48px;
overflow: hidden;
}
.sb-addon-text {
padding-left: 48px;
max-width: 240px;
}
.sb-addon-text h4 {
padding-top: 0px;
}
.sb-addon-img {
position: absolute;
left: 345px;
top: 0;
height: 100%;
width: 200%;
overflow: hidden;
}
.sb-addon-img img {
width: 650px;
transform: rotate(-15deg);
margin-left: 40px;
margin-top: -72px;
box-shadow: 0 0 1px rgba(255, 255, 255, 0);
backface-visibility: hidden;
}
@media screen and (max-width: 800px) {
.sb-addon-img {
left: 300px;
}
}
@media screen and (max-width: 600px) {
.sb-section {
flex-direction: column;
}
.sb-features-grid {
grid-template-columns: repeat(1, 1fr);
}
.sb-socials {
grid-template-columns: repeat(2, 1fr);
}
.sb-addon {
height: 280px;
align-items: flex-start;
padding-top: 32px;
overflow: hidden;
}
.sb-addon-text {
padding-left: 24px;
}
.sb-addon-img {
right: 0;
left: 0;
top: 130px;
bottom: 0;
overflow: hidden;
height: auto;
width: 124%;
}
.sb-addon-img img {
width: 1200px;
transform: rotate(-12deg);
margin-left: 0;
margin-top: 48px;
margin-bottom: -40px;
margin-left: -24px;
}
}
`})]})}function X(t={}){const{wrapper:s}=Object.assign({},c(),t.components);return s?e.jsx(s,Object.assign({},t,{children:e.jsx(g,t)})):g(t)}export{i as RightArrow,X as default};