New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-summary

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-summary

React summaries

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
1
-90%
Maintainers
1
Weekly downloads
 
Created
Source

React-Summary

Summaries for react components.

Usage

import Summary from 'react-summary';

class App() {
  showOthers() {
  	// others
  }

  render() {
    return (
      <Summary items={['hey', 'foo', 'bar', 'selam']}
               max={2}
               onShowOthers={this.showOthers} />
    )
  }
}

Screenshot

Screenshot

Configuration

The Summary component expects the following props.

ParameterDefault
items[]The collection that will be aggregated
max3Maximum visible item count
textObject. Explained on the following table.Translations of visible texts
preventSingleRemainingfalsePrints the last item instead of and 1 more text
onShowOthersNo-opCallback function for show others link
itemRendererIdentity (returns given parameter)A wrapper function for styling items
blockreact-summaryThe className attribute of component

To styling items, you can provide react components in your collection instead of using itemRenderer.

Translation strings:

ParameterDefault
more'more'
and'and'
none'none'

Contributors (You can add your name here in your pull-request)

  • Fatih Erikli fatiherikli@gmail.com

Keywords

react

FAQs

Package last updated on 07 Mar 2016

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