react-placeholder
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -5,2 +5,15 @@ # Change Log | ||
## [v1.0.6](https://github.com/buildo/react-placeholder/tree/v1.0.6) (2017-08-03) | ||
[Full Changelog](https://github.com/buildo/react-placeholder/compare/v1.0.5...v1.0.6) | ||
#### Fixes (bugs & defects): | ||
- @types/react > 33 complains [#41](https://github.com/buildo/react-placeholder/issues/41) | ||
- Animations not working with custom placeholders. [#34](https://github.com/buildo/react-placeholder/issues/34) | ||
#### New features: | ||
- Action required: Greenkeeper could not be activated 🚨 [#39](https://github.com/buildo/react-placeholder/issues/39) | ||
- Action required: Greenkeeper could not be activated 🚨 [#38](https://github.com/buildo/react-placeholder/issues/38) | ||
## [v1.0.5](https://github.com/buildo/react-placeholder/tree/v1.0.5) (2017-06-26) | ||
@@ -7,0 +20,0 @@ [Full Changelog](https://github.com/buildo/react-placeholder/compare/v1.0.4...v1.0.5) |
@@ -1,2 +0,2 @@ | ||
import { Component, ReactChild, ReactNode, ReactElement } from 'react'; | ||
import { ComponentClass, ReactChild, ReactNode, ReactElement } from 'react'; | ||
@@ -11,2 +11,3 @@ interface ReactPlaceholderProps { | ||
color?: string, | ||
showLoadingAnimation?: boolean, | ||
customPlaceholder?: ReactNode | ReactElement<any> | ||
@@ -19,4 +20,3 @@ } | ||
declare class ReactPlaceholder extends Component<ReactPlaceholderProps, ReactPlaceholderState> { } | ||
export default ReactPlaceholder; | ||
declare const ReactPlaceholder: ComponentClass<ReactPlaceholderProps>; | ||
export default ReactPlaceholder; |
@@ -1,2 +0,2 @@ | ||
import { Component } from 'react'; | ||
import { ComponentClass } from 'react'; | ||
@@ -14,3 +14,3 @@ export { TextRow as textRow }; | ||
} | ||
export declare class RectShape extends Component<RectShapeProps, void> { } | ||
export declare const RectShape: ComponentClass<RectShapeProps>; | ||
@@ -22,3 +22,3 @@ interface RoundShapeProps { | ||
} | ||
export declare class RoundShape extends Component<RoundShapeProps, void> { } | ||
export declare const RoundShape: ComponentClass<RoundShapeProps>; | ||
@@ -31,3 +31,3 @@ interface MediaBlockProps { | ||
} | ||
export declare class MediaBlock extends Component<MediaBlockProps, void> { } | ||
export declare const MediaBlock: ComponentClass<MediaBlockProps>; | ||
@@ -41,3 +41,3 @@ interface TextBlockProps { | ||
} | ||
export declare class TextBlock extends Component<TextBlockProps, void> { } | ||
export declare const TextBlock: ComponentClass<TextBlockProps>; | ||
@@ -51,2 +51,2 @@ interface TextRowProps { | ||
} | ||
export declare class TextRow extends Component<TextRowProps, void> { } | ||
export declare const TextRow: ComponentClass<TextRowProps>; |
@@ -67,6 +67,2 @@ 'use strict'; | ||
if (customPlaceholder) { | ||
return customPlaceholder; | ||
} | ||
var classes = showLoadingAnimation ? ['show-loading-animation', className].filter(function (c) { | ||
@@ -76,2 +72,11 @@ return c; | ||
if (customPlaceholder && _react2.default.isValidElement(customPlaceholder)) { | ||
var mergedCustomClasses = [customPlaceholder.props.className, classes].filter(function (c) { | ||
return c; | ||
}).join(' '); | ||
return _react2.default.cloneElement(customPlaceholder, { className: mergedCustomClasses }); | ||
} else if (customPlaceholder) { | ||
return customPlaceholder; | ||
} | ||
var Placeholder = placeholders[type]; | ||
@@ -78,0 +83,0 @@ |
{ | ||
"name": "react-placeholder", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A React component to easily replicate your page with nice placeholders while the content is loading", | ||
@@ -5,0 +5,0 @@ "main": "lib", |
@@ -9,2 +9,3 @@ # React Placeholder | ||
import ReactPlaceholder from 'react-placeholder'; | ||
import "react-placeholder/lib/reactPlaceholder.css"; | ||
@@ -11,0 +12,0 @@ React.renderComponent( |
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
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
37632
483
98