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

reactstrap

Package Overview
Dependencies
Maintainers
1
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactstrap - npm Package Compare versions

Comparing version 0.8.0 to 1.0.0

16

CHANGELOG.md

@@ -0,1 +1,17 @@

<a name="1.0.0"></a>
# [1.0.0](https://github.com/reactstrap/reactstrap/compare/0.8.0...v1.0.0) (2016-03-27)
### Code Refactoring
* **components:** standardize custom tag names ([494e4ec](https://github.com/reactstrap/reactstrap/commit/494e4ec))
### BREAKING CHANGES
* components: `El` prop is now `tag`. This standardizes the way
custom elements should render their html “tags”.
<a name="0.8.0"></a>

@@ -2,0 +18,0 @@ # [0.8.0](https://github.com/reactstrap/reactstrap/compare/0.7.2...v0.8.0) (2016-03-27)

21

lib/Button.jsx

@@ -9,3 +9,3 @@ import React, { PropTypes } from 'react';

disabled: PropTypes.bool,
El: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
onClick: PropTypes.func,

@@ -16,3 +16,4 @@ size: PropTypes.string

const defaultProps = {
color: 'primary'
color: 'primary',
tag: 'button'
};

@@ -38,13 +39,11 @@

render() {
const {
let {
active,
block,
children,
className,
color,
El,
size,
tag: Tag,
...attributes
} = this.props;
let Tag = 'button';

@@ -60,5 +59,3 @@ const classes = classNames(

if (El) {
Tag = El;
} else if (attributes.href) {
if (attributes.href && Tag === 'button') {
Tag = 'a';

@@ -68,7 +65,3 @@ }

return (
<Tag {...attributes}
className={classes}
onClick={this.onClick}>
{children}
</Tag>
<Tag {...attributes} className={classes} onClick={this.onClick}/>
);

@@ -75,0 +68,0 @@ }

@@ -158,3 +158,3 @@ import React, { PropTypes } from 'react';

group,
'tag': TagName,
'tag': Tag,
...attributes

@@ -174,6 +174,6 @@ } = omit(this.props, ['children', 'isOpen']);

return (
<TagName {...attributes}
<Tag {...attributes}
className={classes}>
{this.renderChildren()}
</TagName>
</Tag>
);

@@ -180,0 +180,0 @@ }

import React, { PropTypes } from 'react';
import classNames from 'classnames';
import omit from 'lodash.omit';

@@ -9,3 +8,3 @@ const propTypes = {

divider: PropTypes.bool,
El: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
header: PropTypes.bool,

@@ -16,2 +15,6 @@ isOpen: PropTypes.bool,

const defaultProps = {
tag: 'button'
};
class DropdownItem extends React.Component {

@@ -46,9 +49,7 @@ constructor(props) {

render() {
let Tagname = 'button';
const tabIndex = this.getTabIndex();
const {
let {
className,
children,
divider,
El,
tag: Tag,
header,

@@ -67,26 +68,15 @@ ...props } = this.props;

if (El) {
return (
<El {...props}
tabIndex={tabIndex}
className={classes}
onClick={this.onClick}>
{children}
</El>
);
if (Tag === 'button') {
if (header) {
Tag = 'h6';
} else if (divider) {
Tag = 'div';
}
}
if (header) {
Tagname = 'h6';
} else if (divider) {
Tagname = 'div';
}
return (
<Tagname {...props}
<Tag {...props}
tabIndex={tabIndex}
className={classes}
onClick={this.onClick}>
{children}
</Tagname>
onClick={this.onClick}/>
);

@@ -97,3 +87,4 @@ }

DropdownItem.propTypes = propTypes;
DropdownItem.defaultProps = defaultProps;
export default DropdownItem;
{
"name": "reactstrap",
"version": "0.8.0",
"version": "1.0.0",
"description": "React Bootstrap 4 components compatible with React 0.14.x and 15.x",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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