@khanacademy/wonder-blocks-typography 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/es/index.js +16 -16
- package/dist/index.js +16 -16
- package/package.json +2 -2
- package/src/components/body-monospace.tsx +17 -16
- package/src/components/body-serif-block.tsx +17 -16
- package/src/components/body-serif.tsx +17 -16
- package/src/components/body.tsx +12 -16
- package/src/components/caption.tsx +17 -16
- package/src/components/footnote.tsx +17 -16
- package/src/components/heading-large.tsx +17 -16
- package/src/components/heading-medium.tsx +17 -16
- package/src/components/heading-small.tsx +17 -16
- package/src/components/heading-xsmall.tsx +17 -16
- package/src/components/label-large.tsx +17 -16
- package/src/components/label-medium.tsx +17 -16
- package/src/components/label-small.tsx +17 -16
- package/src/components/label-xsmall.tsx +17 -16
- package/src/components/tagline.tsx +17 -16
- package/src/components/title.tsx +12 -16
- package/tsconfig-build.tsbuildinfo +1 -1
- package/dist/util/types.d.ts +0 -3
- package/dist/util/types.js.flow +0 -9
- package/src/util/types.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-typography
|
|
2
2
|
|
|
3
|
+
## 2.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [1344436f]
|
|
8
|
+
- @khanacademy/wonder-blocks-core@5.4.0
|
|
9
|
+
|
|
10
|
+
## 2.1.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 9f3752d4: Used named functions in componenets with forwarded refs
|
|
15
|
+
- Updated dependencies [9f3752d4]
|
|
16
|
+
- @khanacademy/wonder-blocks-core@5.3.1
|
|
17
|
+
|
|
3
18
|
## 2.1.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/dist/es/index.js
CHANGED
|
@@ -161,7 +161,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
const _excluded$f = ["style", "children", "tag"];
|
|
164
|
-
const Title = React.forwardRef((_ref, ref)
|
|
164
|
+
const Title = React.forwardRef(function Title(_ref, ref) {
|
|
165
165
|
let {
|
|
166
166
|
style,
|
|
167
167
|
children,
|
|
@@ -176,7 +176,7 @@ const Title = React.forwardRef((_ref, ref) => {
|
|
|
176
176
|
});
|
|
177
177
|
|
|
178
178
|
const _excluded$e = ["style", "children", "tag"];
|
|
179
|
-
const HeadingLarge = React.forwardRef((_ref, ref)
|
|
179
|
+
const HeadingLarge = React.forwardRef(function HeadingLarge(_ref, ref) {
|
|
180
180
|
let {
|
|
181
181
|
style,
|
|
182
182
|
children,
|
|
@@ -191,7 +191,7 @@ const HeadingLarge = React.forwardRef((_ref, ref) => {
|
|
|
191
191
|
});
|
|
192
192
|
|
|
193
193
|
const _excluded$d = ["style", "children", "tag"];
|
|
194
|
-
const HeadingMedium = React.forwardRef((_ref, ref)
|
|
194
|
+
const HeadingMedium = React.forwardRef(function HeadingMedium(_ref, ref) {
|
|
195
195
|
let {
|
|
196
196
|
style,
|
|
197
197
|
children,
|
|
@@ -206,7 +206,7 @@ const HeadingMedium = React.forwardRef((_ref, ref) => {
|
|
|
206
206
|
});
|
|
207
207
|
|
|
208
208
|
const _excluded$c = ["style", "children", "tag"];
|
|
209
|
-
const HeadingSmall = React.forwardRef((_ref, ref)
|
|
209
|
+
const HeadingSmall = React.forwardRef(function HeadingSmall(_ref, ref) {
|
|
210
210
|
let {
|
|
211
211
|
style,
|
|
212
212
|
children,
|
|
@@ -221,7 +221,7 @@ const HeadingSmall = React.forwardRef((_ref, ref) => {
|
|
|
221
221
|
});
|
|
222
222
|
|
|
223
223
|
const _excluded$b = ["style", "children", "tag"];
|
|
224
|
-
const HeadingXSmall = React.forwardRef((_ref, ref)
|
|
224
|
+
const HeadingXSmall = React.forwardRef(function HeadingXSmall(_ref, ref) {
|
|
225
225
|
let {
|
|
226
226
|
style,
|
|
227
227
|
children,
|
|
@@ -236,7 +236,7 @@ const HeadingXSmall = React.forwardRef((_ref, ref) => {
|
|
|
236
236
|
});
|
|
237
237
|
|
|
238
238
|
const _excluded$a = ["style", "children", "tag"];
|
|
239
|
-
const BodySerifBlock = React.forwardRef((_ref, ref)
|
|
239
|
+
const BodySerifBlock = React.forwardRef(function BodySerifBlock(_ref, ref) {
|
|
240
240
|
let {
|
|
241
241
|
style,
|
|
242
242
|
children,
|
|
@@ -251,7 +251,7 @@ const BodySerifBlock = React.forwardRef((_ref, ref) => {
|
|
|
251
251
|
});
|
|
252
252
|
|
|
253
253
|
const _excluded$9 = ["style", "children", "tag"];
|
|
254
|
-
const BodySerif = React.forwardRef((_ref, ref)
|
|
254
|
+
const BodySerif = React.forwardRef(function BodySerif(_ref, ref) {
|
|
255
255
|
let {
|
|
256
256
|
style,
|
|
257
257
|
children,
|
|
@@ -266,7 +266,7 @@ const BodySerif = React.forwardRef((_ref, ref) => {
|
|
|
266
266
|
});
|
|
267
267
|
|
|
268
268
|
const _excluded$8 = ["style", "children", "tag"];
|
|
269
|
-
const BodyMonospace = React.forwardRef((_ref, ref)
|
|
269
|
+
const BodyMonospace = React.forwardRef(function BodyMonospace(_ref, ref) {
|
|
270
270
|
let {
|
|
271
271
|
style,
|
|
272
272
|
children,
|
|
@@ -281,7 +281,7 @@ const BodyMonospace = React.forwardRef((_ref, ref) => {
|
|
|
281
281
|
});
|
|
282
282
|
|
|
283
283
|
const _excluded$7 = ["style", "children", "tag"];
|
|
284
|
-
const Body = React.forwardRef((_ref, ref)
|
|
284
|
+
const Body = React.forwardRef(function Body(_ref, ref) {
|
|
285
285
|
let {
|
|
286
286
|
style,
|
|
287
287
|
children,
|
|
@@ -296,7 +296,7 @@ const Body = React.forwardRef((_ref, ref) => {
|
|
|
296
296
|
});
|
|
297
297
|
|
|
298
298
|
const _excluded$6 = ["style", "children", "tag"];
|
|
299
|
-
const LabelLarge = React.forwardRef((_ref, ref)
|
|
299
|
+
const LabelLarge = React.forwardRef(function LabelLarge(_ref, ref) {
|
|
300
300
|
let {
|
|
301
301
|
style,
|
|
302
302
|
children,
|
|
@@ -311,7 +311,7 @@ const LabelLarge = React.forwardRef((_ref, ref) => {
|
|
|
311
311
|
});
|
|
312
312
|
|
|
313
313
|
const _excluded$5 = ["style", "children", "tag"];
|
|
314
|
-
const LabelMedium = React.forwardRef((_ref, ref)
|
|
314
|
+
const LabelMedium = React.forwardRef(function LabelMedium(_ref, ref) {
|
|
315
315
|
let {
|
|
316
316
|
style,
|
|
317
317
|
children,
|
|
@@ -326,7 +326,7 @@ const LabelMedium = React.forwardRef((_ref, ref) => {
|
|
|
326
326
|
});
|
|
327
327
|
|
|
328
328
|
const _excluded$4 = ["style", "children", "tag"];
|
|
329
|
-
const LabelSmall = React.forwardRef((_ref, ref)
|
|
329
|
+
const LabelSmall = React.forwardRef(function LabelSmall(_ref, ref) {
|
|
330
330
|
let {
|
|
331
331
|
style,
|
|
332
332
|
children,
|
|
@@ -341,7 +341,7 @@ const LabelSmall = React.forwardRef((_ref, ref) => {
|
|
|
341
341
|
});
|
|
342
342
|
|
|
343
343
|
const _excluded$3 = ["style", "children", "tag"];
|
|
344
|
-
const LabelXSmall = React.forwardRef((_ref, ref)
|
|
344
|
+
const LabelXSmall = React.forwardRef(function LabelXSmall(_ref, ref) {
|
|
345
345
|
let {
|
|
346
346
|
style,
|
|
347
347
|
children,
|
|
@@ -356,7 +356,7 @@ const LabelXSmall = React.forwardRef((_ref, ref) => {
|
|
|
356
356
|
});
|
|
357
357
|
|
|
358
358
|
const _excluded$2 = ["style", "children", "tag"];
|
|
359
|
-
const Tagline = React.forwardRef((_ref, ref)
|
|
359
|
+
const Tagline = React.forwardRef(function Tagline(_ref, ref) {
|
|
360
360
|
let {
|
|
361
361
|
style,
|
|
362
362
|
children,
|
|
@@ -371,7 +371,7 @@ const Tagline = React.forwardRef((_ref, ref) => {
|
|
|
371
371
|
});
|
|
372
372
|
|
|
373
373
|
const _excluded$1 = ["style", "children", "tag"];
|
|
374
|
-
const Caption = React.forwardRef((_ref, ref)
|
|
374
|
+
const Caption = React.forwardRef(function Caption(_ref, ref) {
|
|
375
375
|
let {
|
|
376
376
|
style,
|
|
377
377
|
children,
|
|
@@ -386,7 +386,7 @@ const Caption = React.forwardRef((_ref, ref) => {
|
|
|
386
386
|
});
|
|
387
387
|
|
|
388
388
|
const _excluded = ["style", "children", "tag"];
|
|
389
|
-
const Footnote = React.forwardRef((_ref, ref)
|
|
389
|
+
const Footnote = React.forwardRef(function Footnote(_ref, ref) {
|
|
390
390
|
let {
|
|
391
391
|
style,
|
|
392
392
|
children,
|
package/dist/index.js
CHANGED
|
@@ -185,7 +185,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
const _excluded$f = ["style", "children", "tag"];
|
|
188
|
-
const Title = React__namespace.forwardRef((_ref, ref)
|
|
188
|
+
const Title = React__namespace.forwardRef(function Title(_ref, ref) {
|
|
189
189
|
let {
|
|
190
190
|
style,
|
|
191
191
|
children,
|
|
@@ -200,7 +200,7 @@ const Title = React__namespace.forwardRef((_ref, ref) => {
|
|
|
200
200
|
});
|
|
201
201
|
|
|
202
202
|
const _excluded$e = ["style", "children", "tag"];
|
|
203
|
-
const HeadingLarge = React__namespace.forwardRef((_ref, ref)
|
|
203
|
+
const HeadingLarge = React__namespace.forwardRef(function HeadingLarge(_ref, ref) {
|
|
204
204
|
let {
|
|
205
205
|
style,
|
|
206
206
|
children,
|
|
@@ -215,7 +215,7 @@ const HeadingLarge = React__namespace.forwardRef((_ref, ref) => {
|
|
|
215
215
|
});
|
|
216
216
|
|
|
217
217
|
const _excluded$d = ["style", "children", "tag"];
|
|
218
|
-
const HeadingMedium = React__namespace.forwardRef((_ref, ref)
|
|
218
|
+
const HeadingMedium = React__namespace.forwardRef(function HeadingMedium(_ref, ref) {
|
|
219
219
|
let {
|
|
220
220
|
style,
|
|
221
221
|
children,
|
|
@@ -230,7 +230,7 @@ const HeadingMedium = React__namespace.forwardRef((_ref, ref) => {
|
|
|
230
230
|
});
|
|
231
231
|
|
|
232
232
|
const _excluded$c = ["style", "children", "tag"];
|
|
233
|
-
const HeadingSmall = React__namespace.forwardRef((_ref, ref)
|
|
233
|
+
const HeadingSmall = React__namespace.forwardRef(function HeadingSmall(_ref, ref) {
|
|
234
234
|
let {
|
|
235
235
|
style,
|
|
236
236
|
children,
|
|
@@ -245,7 +245,7 @@ const HeadingSmall = React__namespace.forwardRef((_ref, ref) => {
|
|
|
245
245
|
});
|
|
246
246
|
|
|
247
247
|
const _excluded$b = ["style", "children", "tag"];
|
|
248
|
-
const HeadingXSmall = React__namespace.forwardRef((_ref, ref)
|
|
248
|
+
const HeadingXSmall = React__namespace.forwardRef(function HeadingXSmall(_ref, ref) {
|
|
249
249
|
let {
|
|
250
250
|
style,
|
|
251
251
|
children,
|
|
@@ -260,7 +260,7 @@ const HeadingXSmall = React__namespace.forwardRef((_ref, ref) => {
|
|
|
260
260
|
});
|
|
261
261
|
|
|
262
262
|
const _excluded$a = ["style", "children", "tag"];
|
|
263
|
-
const BodySerifBlock = React__namespace.forwardRef((_ref, ref)
|
|
263
|
+
const BodySerifBlock = React__namespace.forwardRef(function BodySerifBlock(_ref, ref) {
|
|
264
264
|
let {
|
|
265
265
|
style,
|
|
266
266
|
children,
|
|
@@ -275,7 +275,7 @@ const BodySerifBlock = React__namespace.forwardRef((_ref, ref) => {
|
|
|
275
275
|
});
|
|
276
276
|
|
|
277
277
|
const _excluded$9 = ["style", "children", "tag"];
|
|
278
|
-
const BodySerif = React__namespace.forwardRef((_ref, ref)
|
|
278
|
+
const BodySerif = React__namespace.forwardRef(function BodySerif(_ref, ref) {
|
|
279
279
|
let {
|
|
280
280
|
style,
|
|
281
281
|
children,
|
|
@@ -290,7 +290,7 @@ const BodySerif = React__namespace.forwardRef((_ref, ref) => {
|
|
|
290
290
|
});
|
|
291
291
|
|
|
292
292
|
const _excluded$8 = ["style", "children", "tag"];
|
|
293
|
-
const BodyMonospace = React__namespace.forwardRef((_ref, ref)
|
|
293
|
+
const BodyMonospace = React__namespace.forwardRef(function BodyMonospace(_ref, ref) {
|
|
294
294
|
let {
|
|
295
295
|
style,
|
|
296
296
|
children,
|
|
@@ -305,7 +305,7 @@ const BodyMonospace = React__namespace.forwardRef((_ref, ref) => {
|
|
|
305
305
|
});
|
|
306
306
|
|
|
307
307
|
const _excluded$7 = ["style", "children", "tag"];
|
|
308
|
-
const Body = React__namespace.forwardRef((_ref, ref)
|
|
308
|
+
const Body = React__namespace.forwardRef(function Body(_ref, ref) {
|
|
309
309
|
let {
|
|
310
310
|
style,
|
|
311
311
|
children,
|
|
@@ -320,7 +320,7 @@ const Body = React__namespace.forwardRef((_ref, ref) => {
|
|
|
320
320
|
});
|
|
321
321
|
|
|
322
322
|
const _excluded$6 = ["style", "children", "tag"];
|
|
323
|
-
const LabelLarge = React__namespace.forwardRef((_ref, ref)
|
|
323
|
+
const LabelLarge = React__namespace.forwardRef(function LabelLarge(_ref, ref) {
|
|
324
324
|
let {
|
|
325
325
|
style,
|
|
326
326
|
children,
|
|
@@ -335,7 +335,7 @@ const LabelLarge = React__namespace.forwardRef((_ref, ref) => {
|
|
|
335
335
|
});
|
|
336
336
|
|
|
337
337
|
const _excluded$5 = ["style", "children", "tag"];
|
|
338
|
-
const LabelMedium = React__namespace.forwardRef((_ref, ref)
|
|
338
|
+
const LabelMedium = React__namespace.forwardRef(function LabelMedium(_ref, ref) {
|
|
339
339
|
let {
|
|
340
340
|
style,
|
|
341
341
|
children,
|
|
@@ -350,7 +350,7 @@ const LabelMedium = React__namespace.forwardRef((_ref, ref) => {
|
|
|
350
350
|
});
|
|
351
351
|
|
|
352
352
|
const _excluded$4 = ["style", "children", "tag"];
|
|
353
|
-
const LabelSmall = React__namespace.forwardRef((_ref, ref)
|
|
353
|
+
const LabelSmall = React__namespace.forwardRef(function LabelSmall(_ref, ref) {
|
|
354
354
|
let {
|
|
355
355
|
style,
|
|
356
356
|
children,
|
|
@@ -365,7 +365,7 @@ const LabelSmall = React__namespace.forwardRef((_ref, ref) => {
|
|
|
365
365
|
});
|
|
366
366
|
|
|
367
367
|
const _excluded$3 = ["style", "children", "tag"];
|
|
368
|
-
const LabelXSmall = React__namespace.forwardRef((_ref, ref)
|
|
368
|
+
const LabelXSmall = React__namespace.forwardRef(function LabelXSmall(_ref, ref) {
|
|
369
369
|
let {
|
|
370
370
|
style,
|
|
371
371
|
children,
|
|
@@ -380,7 +380,7 @@ const LabelXSmall = React__namespace.forwardRef((_ref, ref) => {
|
|
|
380
380
|
});
|
|
381
381
|
|
|
382
382
|
const _excluded$2 = ["style", "children", "tag"];
|
|
383
|
-
const Tagline = React__namespace.forwardRef((_ref, ref)
|
|
383
|
+
const Tagline = React__namespace.forwardRef(function Tagline(_ref, ref) {
|
|
384
384
|
let {
|
|
385
385
|
style,
|
|
386
386
|
children,
|
|
@@ -395,7 +395,7 @@ const Tagline = React__namespace.forwardRef((_ref, ref) => {
|
|
|
395
395
|
});
|
|
396
396
|
|
|
397
397
|
const _excluded$1 = ["style", "children", "tag"];
|
|
398
|
-
const Caption = React__namespace.forwardRef((_ref, ref)
|
|
398
|
+
const Caption = React__namespace.forwardRef(function Caption(_ref, ref) {
|
|
399
399
|
let {
|
|
400
400
|
style,
|
|
401
401
|
children,
|
|
@@ -410,7 +410,7 @@ const Caption = React__namespace.forwardRef((_ref, ref) => {
|
|
|
410
410
|
});
|
|
411
411
|
|
|
412
412
|
const _excluded = ["style", "children", "tag"];
|
|
413
|
-
const Footnote = React__namespace.forwardRef((_ref, ref)
|
|
413
|
+
const Footnote = React__namespace.forwardRef(function Footnote(_ref, ref) {
|
|
414
414
|
let {
|
|
415
415
|
style,
|
|
416
416
|
children,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-typography",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"design": "v2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime": "^7.18.6",
|
|
19
|
-
"@khanacademy/wonder-blocks-core": "^5.
|
|
19
|
+
"@khanacademy/wonder-blocks-core": "^5.4.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"aphrodite": "^1.2.5",
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {Text} from "@khanacademy/wonder-blocks-core";
|
|
2
|
+
import {PropsFor, Text} from "@khanacademy/wonder-blocks-core";
|
|
3
3
|
|
|
4
4
|
import styles from "../util/styles";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type Props = PropsFor<typeof Text>;
|
|
7
7
|
|
|
8
|
-
const BodyMonospace = React.forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
8
|
+
const BodyMonospace = React.forwardRef(function BodyMonospace(
|
|
9
|
+
{style, children, tag = "span", ...otherProps}: Props,
|
|
10
|
+
ref,
|
|
11
|
+
) {
|
|
12
|
+
return (
|
|
13
|
+
<Text
|
|
14
|
+
{...otherProps}
|
|
15
|
+
tag={tag}
|
|
16
|
+
style={[styles.BodyMonospace, style]}
|
|
17
|
+
ref={ref}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</Text>
|
|
21
|
+
);
|
|
22
|
+
});
|
|
22
23
|
|
|
23
24
|
export default BodyMonospace;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {Text} from "@khanacademy/wonder-blocks-core";
|
|
2
|
+
import {PropsFor, Text} from "@khanacademy/wonder-blocks-core";
|
|
3
3
|
|
|
4
4
|
import styles from "../util/styles";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type Props = PropsFor<typeof Text>;
|
|
7
7
|
|
|
8
|
-
const BodySerifBlock = React.forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
8
|
+
const BodySerifBlock = React.forwardRef(function BodySerifBlock(
|
|
9
|
+
{style, children, tag = "span", ...otherProps}: Props,
|
|
10
|
+
ref,
|
|
11
|
+
) {
|
|
12
|
+
return (
|
|
13
|
+
<Text
|
|
14
|
+
{...otherProps}
|
|
15
|
+
tag={tag}
|
|
16
|
+
style={[styles.BodySerifBlock, style]}
|
|
17
|
+
ref={ref}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</Text>
|
|
21
|
+
);
|
|
22
|
+
});
|
|
22
23
|
|
|
23
24
|
export default BodySerifBlock;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {Text} from "@khanacademy/wonder-blocks-core";
|
|
2
|
+
import {PropsFor, Text} from "@khanacademy/wonder-blocks-core";
|
|
3
3
|
|
|
4
4
|
import styles from "../util/styles";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type Props = PropsFor<typeof Text>;
|
|
7
7
|
|
|
8
|
-
const BodySerif = React.forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
8
|
+
const BodySerif = React.forwardRef(function BodySerif(
|
|
9
|
+
{style, children, tag = "span", ...otherProps}: Props,
|
|
10
|
+
ref,
|
|
11
|
+
) {
|
|
12
|
+
return (
|
|
13
|
+
<Text
|
|
14
|
+
{...otherProps}
|
|
15
|
+
tag={tag}
|
|
16
|
+
style={[styles.BodySerif, style]}
|
|
17
|
+
ref={ref}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</Text>
|
|
21
|
+
);
|
|
22
|
+
});
|
|
22
23
|
|
|
23
24
|
export default BodySerif;
|
package/src/components/body.tsx
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {Text} from "@khanacademy/wonder-blocks-core";
|
|
2
|
+
import {PropsFor, Text} from "@khanacademy/wonder-blocks-core";
|
|
3
3
|
|
|
4
4
|
import styles from "../util/styles";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type Props = PropsFor<typeof Text>;
|
|
7
7
|
|
|
8
|
-
const Body = React.forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
</Text>
|
|
19
|
-
);
|
|
20
|
-
},
|
|
21
|
-
);
|
|
8
|
+
const Body = React.forwardRef(function Body(
|
|
9
|
+
{style, children, tag = "span", ...otherProps}: Props,
|
|
10
|
+
ref,
|
|
11
|
+
) {
|
|
12
|
+
return (
|
|
13
|
+
<Text {...otherProps} tag={tag} style={[styles.Body, style]} ref={ref}>
|
|
14
|
+
{children}
|
|
15
|
+
</Text>
|
|
16
|
+
);
|
|
17
|
+
});
|
|
22
18
|
|
|
23
19
|
export default Body;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {Text} from "@khanacademy/wonder-blocks-core";
|
|
2
|
+
import {PropsFor, Text} from "@khanacademy/wonder-blocks-core";
|
|
3
3
|
|
|
4
4
|
import styles from "../util/styles";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type Props = PropsFor<typeof Text>;
|
|
7
7
|
|
|
8
|
-
const Caption = React.forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
8
|
+
const Caption = React.forwardRef(function Caption(
|
|
9
|
+
{style, children, tag = "span", ...otherProps}: Props,
|
|
10
|
+
ref,
|
|
11
|
+
) {
|
|
12
|
+
return (
|
|
13
|
+
<Text
|
|
14
|
+
{...otherProps}
|
|
15
|
+
tag={tag}
|
|
16
|
+
style={[styles.Caption, style]}
|
|
17
|
+
ref={ref}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</Text>
|
|
21
|
+
);
|
|
22
|
+
});
|
|
22
23
|
|
|
23
24
|
export default Caption;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {Text} from "@khanacademy/wonder-blocks-core";
|
|
2
|
+
import {PropsFor, Text} from "@khanacademy/wonder-blocks-core";
|
|
3
3
|
|
|
4
4
|
import styles from "../util/styles";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type Props = PropsFor<typeof Text>;
|
|
7
7
|
|
|
8
|
-
const Footnote = React.forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
8
|
+
const Footnote = React.forwardRef(function Footnote(
|
|
9
|
+
{style, children, tag = "span", ...otherProps}: Props,
|
|
10
|
+
ref,
|
|
11
|
+
) {
|
|
12
|
+
return (
|
|
13
|
+
<Text
|
|
14
|
+
{...otherProps}
|
|
15
|
+
tag={tag}
|
|
16
|
+
style={[styles.Footnote, style]}
|
|
17
|
+
ref={ref}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</Text>
|
|
21
|
+
);
|
|
22
|
+
});
|
|
22
23
|
|
|
23
24
|
export default Footnote;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {Text} from "@khanacademy/wonder-blocks-core";
|
|
2
|
+
import {PropsFor, Text} from "@khanacademy/wonder-blocks-core";
|
|
3
3
|
|
|
4
4
|
import styles from "../util/styles";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type Props = PropsFor<typeof Text>;
|
|
7
7
|
|
|
8
|
-
const HeadingLarge = React.forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
8
|
+
const HeadingLarge = React.forwardRef(function HeadingLarge(
|
|
9
|
+
{style, children, tag = "h2", ...otherProps}: Props,
|
|
10
|
+
ref,
|
|
11
|
+
) {
|
|
12
|
+
return (
|
|
13
|
+
<Text
|
|
14
|
+
{...otherProps}
|
|
15
|
+
tag={tag}
|
|
16
|
+
style={[styles.HeadingLarge, style]}
|
|
17
|
+
ref={ref}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</Text>
|
|
21
|
+
);
|
|
22
|
+
});
|
|
22
23
|
|
|
23
24
|
export default HeadingLarge;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {Text} from "@khanacademy/wonder-blocks-core";
|
|
2
|
+
import {PropsFor, Text} from "@khanacademy/wonder-blocks-core";
|
|
3
3
|
|
|
4
4
|
import styles from "../util/styles";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type Props = PropsFor<typeof Text>;
|
|
7
7
|
|
|
8
|
-
const HeadingMedium = React.forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
8
|
+
const HeadingMedium = React.forwardRef(function HeadingMedium(
|
|
9
|
+
{style, children, tag = "h3", ...otherProps}: Props,
|
|
10
|
+
ref,
|
|
11
|
+
) {
|
|
12
|
+
return (
|
|
13
|
+
<Text
|
|
14
|
+
{...otherProps}
|
|
15
|
+
tag={tag}
|
|
16
|
+
style={[styles.HeadingMedium, style]}
|
|
17
|
+
ref={ref}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</Text>
|
|
21
|
+
);
|
|
22
|
+
});
|
|
22
23
|
|
|
23
24
|
export default HeadingMedium;
|