1.0.11 • Published 8 years ago
twreporter-react-components v1.0.11
twreporter-react-components
INSTALL
Need Peer Dependencies:
yarn add react react-dom react-routerInstall:
yarn add twreporter-react-componentsUSE
index-components
import { IndexPageComposite } from 'twreporter-react-components'
const { CategorySection, EditorPicks, Header, InforgraphicSection,
LatestSection, LatestTopicSection, NewsLetterSection, PhotographySection,
ReporterIntro, ReviewsSection, SideBar, TopicsSection } = IndexPageComposite.componentsheader-components
import { Header } from 'twreporter-react-components'
const Page = (props) => (
<div>
<Header
isIndex
pageTheme={props.pageTheme}
pathName={props.pathName}
/>
{props.children}
</div>
)Props:
isIndex: (boolean) The Component is used on index page or not. (default:false)pageTheme: (string) The page theme passed bytwreporter-react.DARKorBRIGHT. (default:'BRIGHT')pathName: (string) The pathname passed bytwreporter-react. With format likes/categories/inforgraphic,/photography. (default:'')
footer-components
import { Footer } from 'twreporter-react-components'
const Page = (props) => (
<div>
{props.children}
<Footer />
</div>
)Props:
none
listing-components
Topics
import { TopicsList } from 'twreporter-react-components'
const Page = (props) =>(
<div>
<PageContent>
<TopicsList
currentPage={props.page}
topics={props.data}
isFetching={props.isFetching}
/>
</PageContent>
</div>
)props:
currentPage(number): current page
topics(array): topics data
isFetching(boolean): is data ready
Developement
Dev
npm run dev will build the package into the customer folder, and start watching the .js files change.
If any .js file has been changed, gulp will babel changed files into the customer folder automatically.
cd twreporter-react-components
npm run devBuild (pre-publish)
cd twreporter-react-components
npm run buildPubish
cd twreporter-react-components
npm publish1.0.11
8 years ago
1.1.0-beta.1.0.2
8 years ago
1.1.0-beta.1.0.1
8 years ago
1.1.0-beta.1.0.0
8 years ago
1.0.10
8 years ago
1.0.9
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.0
8 years ago
1.0.0-beta.9
8 years ago
1.0.0-beta.8
8 years ago
1.0.0-beta.7
8 years ago
1.0.0-beta.6
8 years ago
1.0.0-beta.5
8 years ago
1.0.0-beta.4
8 years ago
1.0.0-beta.3
8 years ago
1.0.0-beta.2
8 years ago
1.0.0-beta.1
8 years ago
0.1.0
9 years ago