🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

react-component-panel

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-component-panel

<!-- badge -->

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
11
266.67%
Maintainers
1
Weekly downloads
 
Created
Source

react-component-panel

npm version npm license npm download npm download

Screen Shot

Install

$ npm i react-component-panel --save

Import

import {Panel,CollapsiblePanel} from 'react-component-panel'

TODO

  • Panel
  • CollapsiblePanel

API

CollapsiblePanel

Extends PureComponent

CollapsiblePanel

Parameters

  • props

Examples

class CollapsiblePanelDemo extends Component {
render() {
	return (
		<CollapsiblePanel title="Collapsible Panel Demo">
			<p>I am collapsible panel !</p>
		</CollapsiblePanel>
	);
}
}

propTypes

...Panel.propTypes

Properties

  • contentStyle Object?
  • contentClassName String?
  • expand Boolean? [ true ] - 是否展开
  • renderExpand Function? [ expand=> {return expand ? "收起" : "展开";} ] - 展开/收起的UI样式
  • onChange Function? 当expand发生变化时调用

Panel

Extends PureComponent

Panel

Examples

Simple Panel Demo

class PanelDemo extends Component{
render(){
	return (
		<Panel title="Panel Title" renderRight={()=>{
			return (
				<button type="button" onClick={()=>{
					alert('pressed');
				}}>press me</button>
			);
		}}>
			<p>panel content</p>
		</Panel>
	);
}
}

propTypes

Properties

FAQs

Package last updated on 21 Aug 2017

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