Skip to content

Commit

Permalink
Merge pull request #13 from mattijauhiainen/master
Browse files Browse the repository at this point in the history
Allow passing 'useNativeClamp' to clamp.js
  • Loading branch information
kkwiatkowski authored May 22, 2017
2 parents a19ac00 + 13aa5c9 commit cc41359
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Dotdotdot.prototype.dotdotdot = function(container) {

clamp(container, {
clamp: this.props.clamp,
useNativeClamp: this.props.useNativeClamp,
truncationChar: this.props.truncationChar
});
}
Expand All @@ -57,11 +58,13 @@ Dotdotdot.propTypes = {
PropTypes.bool
]).isRequired,
truncationChar: PropTypes.string,
useNativeClamp: PropTypes.bool,
className: PropTypes.string
};

Dotdotdot.defaultProps = {
truncationChar: '\u2026'
truncationChar: '\u2026',
useNativeClamp: true
};

module.exports = Dotdotdot;

0 comments on commit cc41359

Please sign in to comment.