Skip to content

Commit ecdd1f7

Browse files
docs(typography): remove MDX file
- delete mdx file in favor of all docs being in stories file - update some story names to follow sentence-casing and organize like- stories together
1 parent 4defd10 commit ecdd1f7

File tree

2 files changed

+17
-119
lines changed

2 files changed

+17
-119
lines changed

components/typography/stories/typography.mdx

-112
This file was deleted.

components/typography/stories/typography.stories.js

+17-7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
import { TypographyGroup } from "./typography.test.js";
1919

2020
/**
21-
* Spectrum typography is broken out into several separate components: heading, body, detail, and code. Internationalized typography examples are also shown.
21+
* Spectrum typography is broken out into several separate components: [heading](#heading), [body](#body), [detail](#detail), and [code](#code). [Internationalized typography examples](#internationalized-typography) are also shown.
2222
*/
2323
export default {
2424
title: "Typography",
@@ -87,7 +87,7 @@ export default {
8787
};
8888

8989
/**
90-
* By default, Typography components do not include outer margins. If you would like to add margins, simply add the `.spectrum-Typography` class to your container, and every typography component inside of your container will have the correct margins.
90+
* By default, typography components do not include outer margins. If you would like to add margins, simply add the `.spectrum-Typography` class to your container, and every typography component inside of your container will have the correct margins.
9191
*/
9292
export const Default = TypographyGroup.bind({});
9393
Default.args = {
@@ -150,6 +150,7 @@ HeadingSizes.args = {
150150
HeadingSizes.parameters = {
151151
chromatic: { disableSnapshot: true },
152152
};
153+
HeadingSizes.storyName = "Heading sizes";
153154

154155
/**
155156
* Body is primarily used for Spectrum components and for blocks of text.
@@ -172,6 +173,7 @@ BodySizes.args = {
172173
BodySizes.parameters = {
173174
chromatic: { disableSnapshot: true },
174175
};
176+
BodySizes.storyName = "Body sizes";
175177

176178
/**
177179
* When typography elements are paired, such as with heading and body below, clear content hierarchies are shown.
@@ -191,6 +193,7 @@ HeadingBodyHierarchy.tags = ["!dev"];
191193
HeadingBodyHierarchy.parameters = {
192194
chromatic: { disableSnapshot: true },
193195
};
196+
HeadingBodyHierarchy.storyName = "Heading with body pairings";
194197

195198
export const DetailSizes = (args, context) => Sizes({
196199
Template,
@@ -212,6 +215,7 @@ DetailSizes.tags = ["!dev"];
212215
DetailSizes.parameters = {
213216
chromatic: { disableSnapshot: true },
214217
};
218+
DetailSizes.storyName = "Detail sizes";
215219

216220
export const CodeSizes = (args, context) => Sizes({
217221
Template,
@@ -229,6 +233,7 @@ CodeSizes.args = {
229233
CodeSizes.parameters = {
230234
chromatic: { disableSnapshot: true },
231235
};
236+
CodeSizes.storyName = "Code sizes";
232237

233238
// ====== Docs: Glyphs and Variants ====== //
234239
/**
@@ -239,6 +244,7 @@ HeadingVariants.tags = ["!dev"];
239244
HeadingVariants.parameters = {
240245
chromatic: { disableSnapshot: true },
241246
};
247+
HeadingVariants.storyName = "Heading";
242248

243249
/**
244250
* Body is a typography component primarily used within Spectrum components and for blocks of text.
@@ -248,6 +254,7 @@ BodyVariants.tags = ["!dev"];
248254
BodyVariants.parameters = {
249255
chromatic: { disableSnapshot: true },
250256
};
257+
BodyVariants.storyName = "Body";
251258

252259
/**
253260
* Detail is used for disclosing extra information or smaller items in hierarchical relationships of text.
@@ -257,6 +264,7 @@ DetailVariants.tags = ["!dev"];
257264
DetailVariants.parameters = {
258265
chromatic: { disableSnapshot: true },
259266
};
267+
DetailVariants.storyName = "Detail";
260268

261269
/**
262270
* Code is used for text that represents code.
@@ -268,20 +276,21 @@ CodeVariants.tags = ["!dev"];
268276
CodeVariants.parameters = {
269277
chromatic: { disableSnapshot: true },
270278
};
279+
CodeVariants.storyName = "Code";
271280

272281
// ====== Docs: Internationalization ====== //
273282
/**
274-
* We should note that Hebrew and Arabic are rtl languages somewhere over here.
283+
* In the examples below, Hebrew and Arabic are "RTL" languages, meaning they are read from right to left.
275284
*/
276285
export const InternationalizedHeading = DocsInternationalizedHeadingVariants.bind({});
277-
InternationalizedHeading.storyName = "Internationalized Heading";
286+
InternationalizedHeading.storyName = "Internationalized heading";
278287
InternationalizedHeading.tags = ["!dev"];
279288
InternationalizedHeading.parameters = {
280289
chromatic: { disableSnapshot: true },
281290
};
282291

283292
export const InternationalizedBody = DocsInternationalizedBodyVariants.bind({});
284-
InternationalizedBody.storyName = "Internationalized Body";
293+
InternationalizedBody.storyName = "Internationalized body";
285294
InternationalizedBody.tags = ["!dev"];
286295
InternationalizedBody.parameters = {
287296
chromatic: { disableSnapshot: true },
@@ -305,16 +314,17 @@ InternationalizedHeadingBodyHierarchy.tags = ["!dev"];
305314
InternationalizedHeadingBodyHierarchy.parameters = {
306315
chromatic: { disableSnapshot: true },
307316
};
317+
InternationalizedHeadingBodyHierarchy.storyName = "Internationalized heading and body pairings";
308318

309319
export const InternationalizedDetail = DocsInternationalizedDetailVariants.bind({});
310-
InternationalizedDetail.storyName = "Internationalized Detail";
320+
InternationalizedDetail.storyName = "Internationalized detail";
311321
InternationalizedDetail.tags = ["!dev"];
312322
InternationalizedDetail.parameters = {
313323
chromatic: { disableSnapshot: true },
314324
};
315325

316326
export const InternationalizedCode = DocsInternationalizedCodeVariants.bind({});
317-
InternationalizedCode.storyName = "Internationalized Code";
327+
InternationalizedCode.storyName = "Internationalized code";
318328
InternationalizedCode.tags = ["!dev"];
319329
InternationalizedCode.parameters = {
320330
chromatic: { disableSnapshot: true },

0 commit comments

Comments
 (0)