Skip to content

Commit 71b0873

Browse files
arteria32Denis Ryabko
andauthored
chore(Table): add microdata values for schema.org integration (#1308)
Co-authored-by: Denis Ryabko <[email protected]>
1 parent f938543 commit 71b0873

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/blocks/Table/Table.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import {Col, Grid, GridColumnSize, Row} from '../../grid';
33
import {TableBlockProps} from '../../models';
44
import {block} from '../../utils';
55

6+
import {TableMicrodataValues} from './models';
7+
68
import './Table.scss';
79

810
const b = block('table-block');
@@ -11,13 +13,15 @@ export const TableBlock = (props: TableBlockProps) => {
1113
const {title, table} = props;
1214

1315
return (
14-
<div className={b()}>
16+
<div className={b()} itemScope itemType={TableMicrodataValues.TableType}>
17+
<meta itemProp={TableMicrodataValues.accessModeProp} content="textual" />
1518
<Grid className={b('content')}>
1619
<Row className={b('row')}>
1720
<Col sizes={{[GridColumnSize.Md]: 4, [GridColumnSize.All]: 12}}>
1821
<YFMWrapper
1922
tagName="h2"
2023
contentClassName={b('title')}
24+
itemProp={TableMicrodataValues.AboutProp}
2125
content={title}
2226
modifiers={{
2327
constructor: true,

src/blocks/Table/models.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const TableMicrodataValues = {
2+
TableType: 'https://schema.org/Table',
3+
AboutProp: 'about',
4+
accessModeProp: 'accessMode',
5+
} as const;

0 commit comments

Comments
 (0)