This repository was archived by the owner on Oct 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathFacebookPreviewExample.js
111 lines (107 loc) · 4.55 KB
/
FacebookPreviewExample.js
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/* External dependencies */
import React from "react";
import styled from "styled-components";
/* Internal dependencies */
import ExamplesContainer from "./ExamplesContainer";
import { FacebookPreview } from "@yoast/social-metadata-previews";
const FacebookPreviewExampleContainer = styled( ExamplesContainer )`
display: flex;
flex-direction: column;
margin-left: 50px;
`;
/**
* Returns the FacebookPreview examples.
*
* @returns {ReactElement} The FacebookPreview examples.
*/
const FacebookPreviewExample = () => {
return (
<FacebookPreviewExampleContainer backgroundColor="transparent">
<h2>FacebookPreview Landscape</h2>
<FacebookPreview
siteUrl="siteUrl.com"
authorName="John Doe"
title="YoastCon Workshops"
description="Some description with words. In two whole sentences."
imageUrl="https://yoast.com/app/uploads/2015/06/How_to_choose_keywords_FI.png"
imageFallbackUrl=""
/>
<h2>FacebookPreview Landscape very large image</h2>
<FacebookPreview
siteUrl="siteUrl.com"
title={
"A very long title. A very long title. A very long title. A very long title. " +
"A very long title. A very long title. A very long title. A very long title. " +
"A very long title. A very long title. A very long title. A very long title. " +
"A very long title. A very long title. A very long title. A very long title. " +
"A very long title. A very long title. A very long title. A very long title. " +
"A very long title. A very long title. A very long title. A very long title. " +
"A very long title. A very long title. A very long title. A very long title. " +
"A very long title. A very long title. A very long title. A very long title. " +
"A very long title. A very long title. A very long title. A very long title."
}
description={
"A very long description. A very long description. A very long description. A very long description. " +
"A very long description. A very long description. A very long description. A very long description. " +
"A very long description. A very long description. A very long description. A very long description. " +
"A very long description. A very long description. A very long description. A very long description. " +
"A very long description. A very long description. A very long description. A very long description. " +
"A very long description. A very long description. A very long description. A very long description. " +
"A very long description. A very long description. A very long description. A very long description. " +
"A very long description. A very long description. A very long description. A very long description. " +
"A very long description. A very long description. A very long description. A very long description."
}
imageUrl="https://yoast.com/app/uploads/2019/02/horizontal-1200x400.jpg"
imageFallbackUrl=""
/>
<h2>FacebookPreview Portrait</h2>
<FacebookPreview
siteUrl="siteUrl.com"
authorName="John Doe"
title="YoastCon Workshops"
description="<h1>Some description with words. And some <strong>HTML</strong> that will get stripped.</h1>"
imageUrl="https://yoast.com/app/uploads/2015/09/Author_Joost_x2.png"
imageFallbackUrl=""
/>
<h2>FacebookPreview Portrait very tall image</h2>
<FacebookPreview
siteUrl="siteUrl.com"
title="YoastCon Workshops"
description=""
imageUrl="https://yoast.com/app/uploads/2019/02/vertical-300x580.jpg"
imageFallbackUrl=""
/>
<h2>FacebookPreview Square</h2>
<FacebookPreview
siteUrl="siteUrl.com"
title="YoastCon Workshops"
description="Some description with words. In two whole sentences."
imageUrl="https://yoast.com/app/uploads/2018/09/avatar_user_1_1537774226.png"
imageFallbackUrl=""
/>
<h2>FacebookPreview image too small</h2>
<FacebookPreview
siteUrl="siteUrl.com"
title="YoastCon Workshops"
description="Some description with words. In two whole sentences."
imageUrl="https://yoast.com/app/uploads/2018/11/Logo_TYPO3-250x105.png"
imageFallbackUrl=""
/>
<h2>FacebookPreview faulty image</h2>
<FacebookPreview
siteUrl="siteUrl.com"
title="YoastCon Workshops"
description="Some description with words. In two whole sentences."
imageUrl="thisisnoimage"
imageFallbackUrl=""
/>
<h2>FacebookPreview no image</h2>
<FacebookPreview
siteUrl="siteUrl.com"
title="YoastCon Workshops"
description="Some description with words. In two whole sentences."
/>
</FacebookPreviewExampleContainer>
);
};
export default FacebookPreviewExample;