diff --git a/src/components/ListingCard/ListingCard.example.js b/src/components/ListingCard/ListingCard.example.js new file mode 100644 index 00000000..f0342efb --- /dev/null +++ b/src/components/ListingCard/ListingCard.example.js @@ -0,0 +1,17 @@ +/* eslint-disable no-console, import/prefer-default-export */ +import React from 'react'; +import ListingCard from './ListingCard'; +import { createUser, createListing } from '../../util/test-data'; + +const author = createUser('user1'); +const listing = { ...createListing('listing1'), author }; + +const ListingCardWrapper = () => ( +
+ +
+); + +export const ListingCardWrapped = { + component: ListingCardWrapper, +}; diff --git a/src/examples.js b/src/examples.js index a80c9ecf..b5af30d0 100644 --- a/src/examples.js +++ b/src/examples.js @@ -1,5 +1,6 @@ // components import * as BookingInfo from './components/BookingInfo/BookingInfo.example'; +import * as ListingCard from './components/ListingCard/ListingCard.example'; import * as NamedLink from './components/NamedLink/NamedLink.example'; // containers @@ -17,6 +18,7 @@ export { ChangeAccountPasswordForm, ChangePasswordForm, HeroSearchForm, + ListingCard, LoginForm, NamedLink, PasswordForgottenForm,