travix-ui-kit
Advanced tools
Comparing version 0.6.30 to 0.6.31
# Change Log | ||
## [v0.6.30](https://github.com/Travix-International/travix-ui-kit/tree/v0.6.30) (2017-10-04) | ||
[Full Changelog](https://github.com/Travix-International/travix-ui-kit/compare/v0.6.29...v0.6.30) | ||
**Merged pull requests:** | ||
- fixes NodeList to Array [\#197](https://github.com/Travix-International/travix-ui-kit/pull/197) ([froskie](https://github.com/froskie)) | ||
## [v0.6.29](https://github.com/Travix-International/travix-ui-kit/tree/v0.6.29) (2017-10-02) | ||
@@ -4,0 +11,0 @@ [Full Changelog](https://github.com/Travix-International/travix-ui-kit/compare/v0.6.28...v0.6.29) |
// Imports | ||
import classnames from 'classnames'; | ||
import PropTypes from 'prop-types'; | ||
@@ -12,2 +13,3 @@ import React from 'react'; | ||
children, | ||
className, | ||
size, | ||
@@ -31,3 +33,6 @@ href, | ||
const className = getClassNamesWithMods('ui-button', mods); | ||
const classes = classnames( | ||
getClassNamesWithMods('ui-button', mods), | ||
className | ||
); | ||
@@ -41,3 +46,3 @@ if (type === 'link') { | ||
return ( | ||
<a className={className} href={href} {...restProps}>{children}</a> | ||
<a className={classes} href={href} {...restProps}>{children}</a> | ||
); | ||
@@ -48,3 +53,3 @@ } | ||
return ( | ||
<button className={className} disabled={disabled} type={type} {...restProps}>{children}</button> | ||
<button className={classes} disabled={disabled} type={type} {...restProps}>{children}</button> | ||
); | ||
@@ -55,3 +60,3 @@ } | ||
<button | ||
className={className} | ||
className={classes} | ||
disabled={disabled} | ||
@@ -85,2 +90,8 @@ onClick={onClick} | ||
/** | ||
* Attribute used to set specific classes which will be combined | ||
* with the "ui-button" class + mods. | ||
*/ | ||
className: PropTypes.string, | ||
/** | ||
* Data attribute. You can use it to set up GTM key or any custom data-* attribute | ||
@@ -87,0 +98,0 @@ */ |
@@ -7,2 +7,3 @@ Basic button: | ||
<Button dataAttrs={{gtm: 'some-id'}} type="reset">With GTM id</Button><br/><br/> | ||
<Button className="my-class">Example with custom class set</Button><br/><br/> | ||
</div> | ||
@@ -38,2 +39,2 @@ | ||
</div> | ||
@@ -46,3 +46,3 @@ Basic Sliding Panel: | ||
active={state.isSlidingPanelOpen} | ||
onTryingToClose={() => { alert('You shall not pass! :)'); return false; }} | ||
onTryingToClose={() => confirm('Are you sure you want to exit?')} | ||
onClose={() => setState({ isSlidingPanelOpen: false })} | ||
@@ -49,0 +49,0 @@ title="Panel Title" |
@@ -10,2 +10,6 @@ 'use strict'; | ||
var _classnames = require('classnames'); | ||
var _classnames2 = _interopRequireDefault(_classnames); | ||
var _propTypes = require('prop-types'); | ||
@@ -28,2 +32,3 @@ | ||
var children = props.children, | ||
className = props.className, | ||
size = props.size, | ||
@@ -48,3 +53,3 @@ href = props.href, | ||
var className = (0, _helpers.getClassNamesWithMods)('ui-button', mods); | ||
var classes = (0, _classnames2.default)((0, _helpers.getClassNamesWithMods)('ui-button', mods), className); | ||
@@ -59,3 +64,3 @@ if (type === 'link') { | ||
'a', | ||
_extends({ className: className, href: href }, restProps), | ||
_extends({ className: classes, href: href }, restProps), | ||
children | ||
@@ -68,3 +73,3 @@ ); | ||
'button', | ||
_extends({ className: className, disabled: disabled, type: type }, restProps), | ||
_extends({ className: classes, disabled: disabled, type: type }, restProps), | ||
children | ||
@@ -77,3 +82,3 @@ ); | ||
_extends({ | ||
className: className, | ||
className: classes, | ||
disabled: disabled, | ||
@@ -101,2 +106,8 @@ onClick: onClick, | ||
/** | ||
* Attribute used to set specific classes which will be combined | ||
* with the "ui-button" class + mods. | ||
*/ | ||
className: _propTypes2.default.string, | ||
/** | ||
* Data attribute. You can use it to set up GTM key or any custom data-* attribute | ||
@@ -103,0 +114,0 @@ */ |
{ | ||
"name": "travix-ui-kit", | ||
"version": "0.6.30", | ||
"version": "0.6.31", | ||
"description": "Travix UI kit", | ||
@@ -49,2 +49,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"classnames": "^2.2.5", | ||
"react-select": "^1.0.0-rc.5" | ||
@@ -51,0 +52,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2792350
2
167
40091
6
+ Addedclassnames@^2.2.5