cf-component-card
Advanced tools
Comparing version 0.2.0 to 0.2.1
"use strict"; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var React = require('react'); | ||
function Card(props) { | ||
return React.createElement( | ||
"section", | ||
{ className: "cf-card" }, | ||
props.children | ||
); | ||
} | ||
var Card = function (_React$Component) { | ||
_inherits(Card, _React$Component); | ||
function Card() { | ||
_classCallCheck(this, Card); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
Card.prototype.render = function render() { | ||
return React.createElement( | ||
"section", | ||
{ className: "cf-card" }, | ||
this.props.children | ||
); | ||
}; | ||
return Card; | ||
}(React.Component); | ||
module.exports = Card; |
"use strict"; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var React = require('react'); | ||
var PropTypes = React.PropTypes; | ||
function CardContent(props) { | ||
return React.createElement( | ||
"div", | ||
{ className: "cf-card__content" }, | ||
React.createElement( | ||
"h3", | ||
{ className: "cf-card__title" }, | ||
props.title | ||
), | ||
props.children | ||
); | ||
} | ||
var CardContent = function (_React$Component) { | ||
_inherits(CardContent, _React$Component); | ||
function CardContent() { | ||
_classCallCheck(this, CardContent); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
CardContent.prototype.render = function render() { | ||
return React.createElement( | ||
"div", | ||
{ className: "cf-card__content" }, | ||
React.createElement( | ||
"h3", | ||
{ className: "cf-card__title" }, | ||
this.props.title | ||
), | ||
this.props.children | ||
); | ||
}; | ||
return CardContent; | ||
}(React.Component); | ||
CardContent.propTypes = { | ||
@@ -20,0 +38,0 @@ title: PropTypes.any.isRequired |
"use strict"; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var React = require('react'); | ||
function CardControl(props) { | ||
return React.createElement( | ||
"div", | ||
{ className: "cf-card__control" }, | ||
props.children | ||
); | ||
} | ||
var CardControl = function (_React$Component) { | ||
_inherits(CardControl, _React$Component); | ||
function CardControl() { | ||
_classCallCheck(this, CardControl); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
CardControl.prototype.render = function render() { | ||
return React.createElement( | ||
"div", | ||
{ className: "cf-card__control" }, | ||
this.props.children | ||
); | ||
}; | ||
return CardControl; | ||
}(React.Component); | ||
module.exports = CardControl; |
"use strict"; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var React = require('react'); | ||
function CardLoadingText(props) { | ||
return React.createElement("div", { className: "cf-card__loading_text" }); | ||
} | ||
var CardLoadingText = function (_React$Component) { | ||
_inherits(CardLoadingText, _React$Component); | ||
function CardLoadingText() { | ||
_classCallCheck(this, CardLoadingText); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
CardLoadingText.prototype.render = function render() { | ||
return React.createElement("div", { className: "cf-card__loading_text" }); | ||
}; | ||
return CardLoadingText; | ||
}(React.Component); | ||
module.exports = CardLoadingText; |
'use strict'; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var React = require('react'); | ||
var PropTypes = React.PropTypes; | ||
function CardMessages(props) { | ||
return React.createElement( | ||
'div', | ||
{ className: 'cf-card__messages' }, | ||
props.messages.map(function (message, index) { | ||
return React.createElement( | ||
'div', | ||
{ key: index, role: 'alert', className: 'cf-card__message cf-card__message--' + message.type }, | ||
message.content | ||
); | ||
}) | ||
); | ||
} | ||
var CardMessages = function (_React$Component) { | ||
_inherits(CardMessages, _React$Component); | ||
function CardMessages() { | ||
_classCallCheck(this, CardMessages); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
CardMessages.prototype.render = function render() { | ||
return React.createElement( | ||
'div', | ||
{ className: 'cf-card__messages' }, | ||
this.props.messages.map(function (message, index) { | ||
return React.createElement( | ||
'div', | ||
{ key: index, role: 'alert', className: 'cf-card__message cf-card__message--' + message.type }, | ||
message.content | ||
); | ||
}) | ||
); | ||
}; | ||
return CardMessages; | ||
}(React.Component); | ||
CardMessages.propTypes = { | ||
@@ -21,0 +39,0 @@ messages: PropTypes.arrayOf(PropTypes.shape({ |
'use strict'; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var React = require('react'); | ||
var PropTypes = React.PropTypes; | ||
function CardSection(props) { | ||
return React.createElement( | ||
'div', | ||
{ className: 'cf-card__section cf-card__section--' + props.status }, | ||
props.children | ||
); | ||
} | ||
var CardSection = function (_React$Component) { | ||
_inherits(CardSection, _React$Component); | ||
function CardSection() { | ||
_classCallCheck(this, CardSection); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
CardSection.prototype.render = function render() { | ||
return React.createElement( | ||
'div', | ||
{ className: 'cf-card__section cf-card__section--' + this.props.status }, | ||
this.props.children | ||
); | ||
}; | ||
return CardSection; | ||
}(React.Component); | ||
CardSection.propTypes = { | ||
@@ -15,0 +33,0 @@ status: PropTypes.oneOf(['default', 'error']) |
"use strict"; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var React = require('react'); | ||
var PropTypes = React.PropTypes; | ||
function CardToolbar(props) { | ||
return React.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar" }, | ||
React.createElement( | ||
var CardToolbar = function (_React$Component) { | ||
_inherits(CardToolbar, _React$Component); | ||
function CardToolbar() { | ||
_classCallCheck(this, CardToolbar); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
CardToolbar.prototype.render = function render() { | ||
return React.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar_controls" }, | ||
props.controls | ||
), | ||
React.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar_links", role: "tablist" }, | ||
props.links | ||
) | ||
); | ||
} | ||
{ className: "cf-card__toolbar" }, | ||
React.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar_controls" }, | ||
this.props.controls | ||
), | ||
React.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar_links", role: "tablist" }, | ||
this.props.links | ||
) | ||
); | ||
}; | ||
return CardToolbar; | ||
}(React.Component); | ||
CardToolbar.propTypes = { | ||
@@ -24,0 +42,0 @@ controls: PropTypes.any, |
{ | ||
"name": "cf-component-card", | ||
"description": "CloudFlare Card Component", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"main": "lib/index.js", | ||
@@ -12,3 +12,3 @@ "author": "James Kyle <jkyle@cloudflare.com>", | ||
"dependencies": { | ||
"cf-component-link": "^3.0.1", | ||
"cf-component-link": "^3.0.2", | ||
"react": "^0.14.2" | ||
@@ -18,5 +18,5 @@ }, | ||
"assert-equal-jsx": "^1.0.0", | ||
"cf-component-button": "^2.2.2", | ||
"cf-component-button": "^2.2.3", | ||
"react-dom": "^0.14.2" | ||
} | ||
} |
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
18423
322
Updatedcf-component-link@^3.0.2