Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@twreporter/react-components

Package Overview
Dependencies
Maintainers
4
Versions
472
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twreporter/react-components

[![Tag](https://img.shields.io/github/tag/twreporter/twreporter-react-components.svg)](https://github.com/twreporter/twreporter-react-components/tags) [![NPM version](https://img.shields.io/npm/v/@twreporter/react-components.svg)](https://www.npmjs.com/pa

  • 3.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
423
decreased by-11.87%
Maintainers
4
Weekly downloads
 
Created
Source

Tag NPM version

@twreporter/react-components

INSTALL

Need Peer Dependencies:

yarn add react react-dom react-router

Install:

yarn add @twreporter/react-components

Usage

@twreporter/react-components pkg provides many react components we are using in our website. It contains

index-components

These components are used to render twreporter main site homepage.

Check source code to understand how to use it.

header

Our main site uses header component to render the header.

Check source code to understand how to use it well.

Our main site uses footer component to render the footer.

pagination

Topic listing page uses pagination component to show the page list.

Check source code here.

listing-page

listing-page contains two different lists, one is topic list, another is post list.

Check topic list source code and post list source code to know how to use it.

fullpage-slides

This high-risk-youth-life-is-a-struggle multimedia work is using fullpage-slides to render.

Check out the source code

cinemagraph

In high-risk-youth-life-is-a-struggle multimedia work, you will see two images sliding from different direction to compose a single full image. That tech is using cinemagraph component.

Checkout the source code here.

confirmation-components

import { Confirmation } from '@twreporter/react-components'


const Page = (props) =>(
  <div>
    <Confirmation
      onCancel={this.onCancel}
      onConfirm={this.onConfirm}
      content={DIALOG_CONTENT}
      confirm={DIALOG_CONFIRM}
      cancel={DIALOG_CANCEL}
    />
  </div>
)

props:

  • onCancel(func): User click on cancel button will trigger onCancel
  • onConfirm(func): User click on cancel button will trigger onConfirm
  • content(string): Information in dialog
  • confirm(string): confirm button text
  • cancel(string): cancel button text

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 dev

Build (pre-publish)

cd twreporter-react-components
npm run build

Pubish

cd twreporter-react-components
npm publish

FAQs

Package last updated on 17 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc