forked from Yoast/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLanguageNoticeWrapper.js
More file actions
33 lines (29 loc) · 1.02 KB
/
LanguageNoticeWrapper.js
File metadata and controls
33 lines (29 loc) · 1.02 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
import React from "react";
import styled from "styled-components";
import { LanguageNotice, languageNoticePropType } from "@yoast/components";
export const LanguageNoticeContainer = styled.div`
background-color: white;
max-width: 800px;
margin: 0 auto;
`;
/**
* Returns the LanguageNoticeWrapper component.
*
* @param {Object} props The props for this language notice wrapper.
* @param {string} props.changeLanguageLink The URL where the language can be changed.
* @param {bool} props.canChangeLanguage Whether or not the language can be changed.
* @param {string} props.language The currently set language.
* @param {bool} props.showLanguageNotice Whether or not the language notice is shown.
*
* @returns {ReactElement} The LanguageNoticeWrapper component.
*/
export default function LanguageNoticeWrapper( props ) {
return (
<LanguageNoticeContainer>
<LanguageNotice
{ ...props }
/>
</LanguageNoticeContainer>
);
}
LanguageNoticeWrapper.propTypes = languageNoticePropType;