Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed .storybook/main.ts:Zone.Identifier
Empty file.
Empty file.
Empty file.
Empty file removed public/vite.svg:Zone.Identifier
Empty file.
266 changes: 64 additions & 202 deletions src/stories/Configure.mdx
Original file line number Diff line number Diff line change
@@ -1,208 +1,147 @@
import { Meta } from "@storybook/blocks";

import Github from "./assets/github.svg";
import Discord from "./assets/discord.svg";
import Youtube from "./assets/youtube.svg";
import Tutorials from "./assets/tutorials.svg";
import Styling from "./assets/styling.png";
import Context from "./assets/context.png";
import Assets from "./assets/assets.png";
import Docs from "./assets/docs.png";
import Share from "./assets/share.png";
import FigmaPlugin from "./assets/figma-plugin.png";
import Testing from "./assets/testing.png";
import Accessibility from "./assets/accessibility.png";
import Theming from "./assets/theming.png";
import AddonLibrary from "./assets/addon-library.png";

export const RightArrow = () => <svg
viewBox="0 0 14 14"
width="8px"
height="14px"
style={{
import { Meta } from '@storybook/blocks'

import Github from './assets/github.svg'
import Discord from './assets/discord.svg'
import Youtube from './assets/youtube.svg'
import Tutorials from './assets/tutorials.svg'
import Styling from './assets/styling.png'
import Context from './assets/context.png'
import Assets from './assets/assets.png'
import Docs from './assets/docs.png'
import Share from './assets/share.png'
import FigmaPlugin from './assets/figma-plugin.png'
import Testing from './assets/testing.png'
import Accessibility from './assets/accessibility.png'
import Theming from './assets/theming.png'
import AddonLibrary from './assets/addon-library.png'

export const RightArrow = () => (
<svg
viewBox='0 0 14 14'
width='8px'
height='14px'
style={{
marginLeft: '4px',
display: 'inline-block',
shapeRendering: 'inherit',
verticalAlign: 'middle',
fill: 'currentColor',
'path fill': 'currentColor'
'path fill': 'currentColor',
}}
>
<path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
</svg>
>
<path d='m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z' />
</svg>
)

<Meta title="Configure your project" />
<Meta title='Configure React NES Components' />

<div className="sb-container">
<div className='sb-section-title'>
# Configure your project
# Configure React NES Components

Welcome to React NES Components! This guide will help you set up and configure the components in your project. Below, you'll find essential information about styling, theming, and integration with your application.

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.
</div>
<div className="sb-section">
<div className="sb-section-item">
<img
src={Styling}
alt="A wall of logos representing different styling technologies"
alt="NES-style UI components with different styling options"
/>
<h4 className="sb-section-item-heading">Add styling and CSS</h4>
<p className="sb-section-item-paragraph">Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.</p>
<h4 className="sb-section-item-heading">NES-Style Styling</h4>
<p className="sb-section-item-paragraph">Learn how to customize the retro NES look and feel of your components. From pixel-perfect borders to authentic color palettes, make your UI truly nostalgic.</p>
<a
href="https://storybook.js.org/docs/react/configure/styling-and-css"
href="#styling"
target="_blank"
>Learn more<RightArrow /></a>
</div>
<div className="sb-section-item">
<img
src={Context}
alt="An abstraction representing the composition of data for a component"
alt="Component composition and context usage"
/>
<h4 className="sb-section-item-heading">Provide context and mocking</h4>
<p className="sb-section-item-paragraph">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.</p>
<h4 className="sb-section-item-heading">Component Context</h4>
<p className="sb-section-item-paragraph">Understand how to properly integrate NES components with your React application's context providers and state management.</p>
<a
href="https://storybook.js.org/docs/react/writing-stories/decorators#context-for-mocking"
href="#context"
target="_blank"
>Learn more<RightArrow /></a>
</div>
<div className="sb-section-item">
<img src={Assets} alt="A representation of typography and image assets" />
<img src={Assets} alt="NES-style assets and resources" />
<div>
<h4 className="sb-section-item-heading">Load assets and resources</h4>
<p className="sb-section-item-paragraph">To link static files (like fonts) to your projects and stories, use the
`staticDirs` configuration option to specify folders to load when
starting Storybook.</p>
<h4 className="sb-section-item-heading">Assets and Resources</h4>
<p className="sb-section-item-paragraph">Access and customize the pixel art assets, fonts, and other resources that make your NES components authentic.</p>
<a
href="https://storybook.js.org/docs/react/configure/images-and-assets"
href="#assets"
target="_blank"
>Learn more<RightArrow /></a>
</div>
</div>
</div>
</div>

<div className="sb-container">
<div className='sb-section-title'>
# Do more with Storybook
# Advanced Features

Take your NES components to the next level with these advanced features and integrations.

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.
</div>

<div className="sb-section">
<div className="sb-features-grid">
<div className="sb-grid-item">
<img src={Docs} alt="A screenshot showing the autodocs tag being set, pointing a docs page being generated" />
<h4 className="sb-section-item-heading">Autodocs</h4>
<p className="sb-section-item-paragraph">Auto-generate living,
interactive reference documentation from your components and stories.</p>
<a
href="https://storybook.js.org/docs/react/writing-docs/autodocs"
target="_blank"
>Learn more<RightArrow /></a>
</div>
<div className="sb-grid-item">
<img src={Share} alt="A browser window showing a Storybook being published to a chromatic.com URL" />
<h4 className="sb-section-item-heading">Publish to Chromatic</h4>
<p className="sb-section-item-paragraph">Publish your Storybook to review and collaborate with your entire team.</p>
<a
href="https://storybook.js.org/docs/react/sharing/publish-storybook#publish-storybook-with-chromatic"
target="_blank"
>Learn more<RightArrow /></a>
</div>
<div className="sb-grid-item">
<img src={FigmaPlugin} alt="Windows showing the Storybook plugin in Figma" />
<h4 className="sb-section-item-heading">Figma Plugin</h4>
<p className="sb-section-item-paragraph">Embed your stories into Figma to cross-reference the design and live
implementation in one place.</p>
<img src={Docs} alt="Component documentation" />
<h4 className="sb-section-item-heading">Component Documentation</h4>
<p className="sb-section-item-paragraph">Explore detailed documentation for each NES component, including props, examples, and usage guidelines.</p>
<a
href="https://storybook.js.org/docs/react/sharing/design-integrations#embed-storybook-in-figma-with-the-plugin"
href="#docs"
target="_blank"
>Learn more<RightArrow /></a>
</div>
<div className="sb-grid-item">
<img src={Testing} alt="Screenshot of tests passing and failing" />
<img src={Testing} alt="Testing NES components" />
<h4 className="sb-section-item-heading">Testing</h4>
<p className="sb-section-item-paragraph">Use stories to test a component in all its variations, no matter how
complex.</p>
<p className="sb-section-item-paragraph">Learn how to write effective tests for your NES components, ensuring they work perfectly in all scenarios.</p>
<a
href="https://storybook.js.org/docs/react/writing-tests"
href="#testing"
target="_blank"
>Learn more<RightArrow /></a>
</div>
<div className="sb-grid-item">
<img src={Accessibility} alt="Screenshot of accessibility tests passing and failing" />
<img src={Accessibility} alt="Accessibility considerations" />
<h4 className="sb-section-item-heading">Accessibility</h4>
<p className="sb-section-item-paragraph">Automatically test your components for a11y issues as you develop.</p>
<p className="sb-section-item-paragraph">Make your NES components accessible while maintaining their retro aesthetic.</p>
<a
href="https://storybook.js.org/docs/react/writing-tests/accessibility-testing"
href="#accessibility"
target="_blank"
>Learn more<RightArrow /></a>
</div>
<div className="sb-grid-item">
<img src={Theming} alt="Screenshot of Storybook in light and dark mode" />
<h4 className="sb-section-item-heading">Theming</h4>
<p className="sb-section-item-paragraph">Theme Storybook's UI to personalize it to your project.</p>
<img src={Theming} alt="Custom theming options" />
<h4 className="sb-section-item-heading">Custom Theming</h4>
<p className="sb-section-item-paragraph">Create custom themes for your NES components while preserving their authentic look and feel.</p>
<a
href="https://storybook.js.org/docs/react/configure/theming"
href="#theming"
target="_blank"
>Learn more<RightArrow /></a>
</div>
</div>
</div>
</div>
<div className='sb-addon'>
<div className='sb-addon-text'>
<h4>Addons</h4>
<p className="sb-section-item-paragraph">Integrate your tools with Storybook to connect workflows.</p>
<a
href="https://storybook.js.org/integrations/"
target="_blank"
>Discover all addons<RightArrow /></a>
</div>
<div className='sb-addon-img'>
<img src={AddonLibrary} alt="Integrate your tools with Storybook to connect workflows." />
</div>
</div>

<div className="sb-section sb-socials">
<div className="sb-section-item">
<img src={Github} alt="Github logo" className="sb-explore-image"/>
Join our contributors building the future of UI development.
Contribute to the React NES Components project.

<a
href="https://github.com/storybookjs/storybook"
href="https://github.com/koji/react-nes-components"
target="_blank"
>Star on GitHub<RightArrow /></a>
</div>
<div className="sb-section-item">
<img src={Discord} alt="Discord logo" className="sb-explore-image"/>
<div>
Get support and chat with frontend developers.

<a
href="https://discord.gg/storybook"
target="_blank"
>Join Discord server<RightArrow /></a>
</div>
</div>
<div className="sb-section-item">
<img src={Youtube} alt="Youtube logo" className="sb-explore-image"/>
<div>
Watch tutorials, feature previews and interviews.

<a
href="https://www.youtube.com/@chromaticui"
target="_blank"
>Watch on YouTube<RightArrow /></a>
</div>
</div>
<div className="sb-section-item">
<img src={Tutorials} alt="A book" className="sb-explore-image"/>
<p>Follow guided walkthroughs on for key workflows.</p>

<a
href="https://storybook.js.org/tutorials/"
target="_blank"
>Discover tutorials<RightArrow /></a>
</div>
</div>

<style>
Expand Down Expand Up @@ -270,53 +209,6 @@ export const RightArrow = () => <svg
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;
Expand All @@ -329,36 +221,6 @@ export const RightArrow = () => <svg
.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;
}
}
`}
</style>