-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTypographyLinks.tsx
More file actions
55 lines (51 loc) · 2.36 KB
/
TypographyLinks.tsx
File metadata and controls
55 lines (51 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import React from 'react';
const TypographyLinks = () => {
const sentence = 'The quick brown fox jumps over the lazy dog';
const fontSizesLinks = [
{ lineHeight: 24, name: 'l', size: 16 },
{ lineHeight: 21, name: 'm', size: 14 },
{ lineHeight: 18, name: 's', size: 12 },
{ lineHeight: 15, name: 'xs', size: 10 },
];
const fontWeights = [
{ name: 'normal', weight: '400' },
{ name: 'semi', weight: '600' },
];
return (
<table className="ids-table">
<caption className="ids-table__caption">Header</caption>
<thead className="ids-table__header">
<tr className="ids-table__row">
<th className="ids-table__header-cell">Sentence</th>
<th className="ids-table__header-cell">Name</th>
<th className="ids-table__header-cell">Style</th>
<th className="ids-table__header-cell">Weight</th>
<th className="ids-table__header-cell">Size</th>
<th className="ids-table__header-cell">Line-height</th>
</tr>
</thead>
<tbody className="ids-table__body">
{fontWeights.map(({ name: weightName, weight }) => {
return fontSizesLinks.map(({ name: sizeName, size, lineHeight }) => {
const className = `link-${sizeName}-${weightName} ids-link`;
return (
<tr className="ids-table__row" key={className}>
<td className="ids-table__cell">
<a className={className} href="#">
{sentence}
</a>
</td>
<td className="ids-table__cell">Work sans</td>
<td className="ids-table__cell">normal</td>
<td className="ids-table__cell">{weight}</td>
<td className="ids-table__cell">{size}px</td>
<td className="ids-table__cell">{lineHeight}px</td>
</tr>
);
});
})}
</tbody>
</table>
);
};
export default TypographyLinks;