gatsby-starter-netlify-cms/src/components/Testimonials.js
2018-03-14 15:38:46 +07:00

27 lines
567 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react'
import PropTypes from 'prop-types'
const Testimonials = ({ testimonials }) => (
<div>
{testimonials.map(testimonial => (
<article className="message">
<div className="message-body">
{testimonial.quote}
<br />
<cite> {testimonial.author}</cite>
</div>
</article>
))}
</div>
)
Testimonials.propTypes = {
testimonials: PropTypes.arrayOf(
PropTypes.shape({
quote: PropTypes.string,
author: PropTypes.string,
})
),
}
export default Testimonials