forked from pittica/gatsby-plugin-trustpilot-widget
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Asimthande
committed
Jul 9, 2021
1 parent
79b1ecd
commit 4ca3b5c
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React, { Fragment } from "react"; | ||
import PropTypes from "prop-types"; | ||
import templates from "./templates"; | ||
import TrustpilotContainer from "./TrustpilotContainer"; | ||
import useSitePluginOptions from "./hooks/useSitePluginOptions"; | ||
|
||
const Mini = ({ | ||
language, | ||
culture, | ||
theme, | ||
height, | ||
width, | ||
stars, | ||
}) => { | ||
const reference = React.createRef(); | ||
const { business, username } = useSitePluginOptions(); | ||
|
||
return ( | ||
<Fragment> | ||
<TrustpilotContainer | ||
reference={reference} | ||
template={templates.Mini} | ||
business={business} | ||
username={username} | ||
language={language} | ||
culture={culture} | ||
theme={theme} | ||
height={height} | ||
width={width} | ||
stars={stars} | ||
/> | ||
</Fragment> | ||
); | ||
}; | ||
|
||
Mini.propTypes = { | ||
language: PropTypes.string, | ||
culture: PropTypes.string, | ||
theme: PropTypes.string, | ||
height: PropTypes.string, | ||
width: PropTypes.string, | ||
stars: PropTypes.number, | ||
}; | ||
|
||
Mini.defaultProps = { | ||
language: "en", | ||
culture: "US", | ||
theme: "light", | ||
height: "24px", | ||
width: "100%", | ||
stars: 5, | ||
}; | ||
|
||
export default Mini; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters