25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

212 lines
5.1 KiB

  1. import { Meta } from '@storybook/addon-docs';
  2. import Code from './assets/code-brackets.svg';
  3. import Colors from './assets/colors.svg';
  4. import Comments from './assets/comments.svg';
  5. import Direction from './assets/direction.svg';
  6. import Flow from './assets/flow.svg';
  7. import Plugin from './assets/plugin.svg';
  8. import Repo from './assets/repo.svg';
  9. import StackAlt from './assets/stackalt.svg';
  10. <Meta title="Example/Introduction" />
  11. <style>{`
  12. .subheading {
  13. --mediumdark: '#999999';
  14. font-weight: 900;
  15. font-size: 13px;
  16. color: #999;
  17. letter-spacing: 6px;
  18. line-height: 24px;
  19. text-transform: uppercase;
  20. margin-bottom: 12px;
  21. margin-top: 40px;
  22. }
  23. .link-list {
  24. display: grid;
  25. grid-template-columns: 1fr;
  26. grid-template-rows: 1fr 1fr;
  27. row-gap: 10px;
  28. }
  29. @media (min-width: 620px) {
  30. .link-list {
  31. row-gap: 20px;
  32. column-gap: 20px;
  33. grid-template-columns: 1fr 1fr;
  34. }
  35. }
  36. @media all and (-ms-high-contrast:none) {
  37. .link-list {
  38. display: -ms-grid;
  39. -ms-grid-columns: 1fr 1fr;
  40. -ms-grid-rows: 1fr 1fr;
  41. }
  42. }
  43. .link-item {
  44. display: block;
  45. padding: 20px 30px 20px 15px;
  46. border: 1px solid #00000010;
  47. border-radius: 5px;
  48. transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
  49. color: #333333;
  50. display: flex;
  51. align-items: flex-start;
  52. }
  53. .link-item:hover {
  54. border-color: #1EA7FD50;
  55. transform: translate3d(0, -3px, 0);
  56. box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
  57. }
  58. .link-item:active {
  59. border-color: #1EA7FD;
  60. transform: translate3d(0, 0, 0);
  61. }
  62. .link-item strong {
  63. font-weight: 700;
  64. display: block;
  65. margin-bottom: 2px;
  66. }
  67. .link-item img {
  68. height: 40px;
  69. width: 40px;
  70. margin-right: 15px;
  71. flex: none;
  72. }
  73. .link-item span {
  74. font-size: 14px;
  75. line-height: 20px;
  76. }
  77. .tip {
  78. display: inline-block;
  79. border-radius: 1em;
  80. font-size: 11px;
  81. line-height: 12px;
  82. font-weight: 700;
  83. background: #E7FDD8;
  84. color: #66BF3C;
  85. padding: 4px 12px;
  86. margin-right: 10px;
  87. vertical-align: top;
  88. }
  89. .tip-wrapper {
  90. font-size: 13px;
  91. line-height: 20px;
  92. margin-top: 40px;
  93. margin-bottom: 40px;
  94. }
  95. .tip-wrapper code {
  96. font-size: 12px;
  97. display: inline-block;
  98. }
  99. `}</style>
  100. # Welcome to Storybook
  101. Storybook helps you build UI components in isolation from your app's business logic, data, and context.
  102. That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
  103. Browse example stories now by navigating to them in the sidebar.
  104. View their code in the `src/stories` directory to learn how they work.
  105. We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
  106. <div className="subheading">Configure</div>
  107. <div className="link-list">
  108. <a
  109. className="link-item"
  110. href="https://storybook.js.org/docs/react/addons/addon-types"
  111. target="_blank"
  112. >
  113. <img src={Plugin} alt="plugin" />
  114. <span>
  115. <strong>Presets for popular tools</strong>
  116. Easy setup for TypeScript, SCSS and more.
  117. </span>
  118. </a>
  119. <a
  120. className="link-item"
  121. href="https://storybook.js.org/docs/react/configure/webpack"
  122. target="_blank"
  123. >
  124. <img src={StackAlt} alt="Build" />
  125. <span>
  126. <strong>Build configuration</strong>
  127. How to customize webpack and Babel
  128. </span>
  129. </a>
  130. <a
  131. className="link-item"
  132. href="https://storybook.js.org/docs/react/configure/styling-and-css"
  133. target="_blank"
  134. >
  135. <img src={Colors} alt="colors" />
  136. <span>
  137. <strong>Styling</strong>
  138. How to load and configure CSS libraries
  139. </span>
  140. </a>
  141. <a
  142. className="link-item"
  143. href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
  144. target="_blank"
  145. >
  146. <img src={Flow} alt="flow" />
  147. <span>
  148. <strong>Data</strong>
  149. Providers and mocking for data libraries
  150. </span>
  151. </a>
  152. </div>
  153. <div className="subheading">Learn</div>
  154. <div className="link-list">
  155. <a className="link-item" href="https://storybook.js.org/docs" target="_blank">
  156. <img src={Repo} alt="repo" />
  157. <span>
  158. <strong>Storybook documentation</strong>
  159. Configure, customize, and extend
  160. </span>
  161. </a>
  162. <a className="link-item" href="https://storybook.js.org/tutorials/" target="_blank">
  163. <img src={Direction} alt="direction" />
  164. <span>
  165. <strong>In-depth guides</strong>
  166. Best practices from leading teams
  167. </span>
  168. </a>
  169. <a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
  170. <img src={Code} alt="code" />
  171. <span>
  172. <strong>GitHub project</strong>
  173. View the source and add issues
  174. </span>
  175. </a>
  176. <a className="link-item" href="https://discord.gg/storybook" target="_blank">
  177. <img src={Comments} alt="comments" />
  178. <span>
  179. <strong>Discord chat</strong>
  180. Chat with maintainers and the community
  181. </span>
  182. </a>
  183. </div>
  184. <div className="tip-wrapper">
  185. <span className="tip">Tip</span>Edit the Markdown in{' '}
  186. <code>src/stories/Introduction.stories.mdx</code>
  187. </div>