@convertkit/design
Advanced tools
Comparing version 0.0.8 to 0.0.9
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
import React from "react"; | ||
import classNames from "classnames"; | ||
import Button from "../buttons"; | ||
var Action = React.forwardRef(function (props, ref) { | ||
var Action = React.forwardRef(function (_ref, ref) { | ||
var destructive = _ref.destructive, | ||
props = _objectWithoutProperties(_ref, ["destructive"]); | ||
var className = classNames("mx-1 flex-auto", props.className); | ||
@@ -8,0 +15,0 @@ return React.createElement(Button, _extends({}, props, { |
@@ -26,4 +26,2 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
var children = _ref.children, | ||
_ref$cancelText = _ref.cancelText, | ||
cancelText = _ref$cancelText === void 0 ? "Cancel" : _ref$cancelText, | ||
label = _ref.label, | ||
@@ -50,8 +48,7 @@ onClose = _ref.onClose; | ||
className: "flex items-center justify-center mt-8 -mx-1" | ||
}, actions, React.createElement(Action, { | ||
color: "gray", | ||
className: "focus:outline-none", | ||
ref: close, | ||
onClick: onClose | ||
}, cancelText))); | ||
}, actions.map(function (action) { | ||
return action.props.destructive ? action : React.cloneElement(action, { | ||
ref: close | ||
}); | ||
}))); | ||
} | ||
@@ -62,5 +59,4 @@ | ||
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired, | ||
cancelText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), | ||
onClose: PropTypes.func.isRequired | ||
}; | ||
export default ConfirmModal; |
{ | ||
"name": "@convertkit/design", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Design System for ConvertKit", | ||
@@ -53,18 +53,18 @@ "main": "index.js", | ||
"/badge/index.js": "/badge/index.js", | ||
"/card/card.js": "/card/card.js", | ||
"/card/cards.js": "/card/cards.js", | ||
"/card/index.js": "/card/index.js", | ||
"/buttons/button.js": "/buttons/button.js", | ||
"/buttons/icon-button.js": "/buttons/icon-button.js", | ||
"/buttons/index.js": "/buttons/index.js", | ||
"/card/card.js": "/card/card.js", | ||
"/card/index.js": "/card/index.js", | ||
"/card/cards.js": "/card/cards.js", | ||
"/icon/icons.js": "/icon/icons.js", | ||
"/icon/index.js": "/icon/index.js", | ||
"/icon/library.js": "/icon/library.js", | ||
"/note/index.js": "/note/index.js", | ||
"/utils/partition.js": "/utils/partition.js", | ||
"/modals/action.js": "/modals/action.js", | ||
"/modals/confirm-modal.js": "/modals/confirm-modal.js", | ||
"/modals/index.js": "/modals/index.js", | ||
"/modals/modal.js": "/modals/modal.js", | ||
"/note/index.js": "/note/index.js", | ||
"/utils/partition.js": "/utils/partition.js", | ||
"/icon/icons.js": "/icon/icons.js", | ||
"/icon/index.js": "/icon/index.js", | ||
"/icon/library.js": "/icon/library.js" | ||
"/modals/modal.js": "/modals/modal.js" | ||
} | ||
} |
@@ -342,12 +342,12 @@ module.exports = { | ||
backgroundAttachment: ["responsive"], | ||
backgroundColor: ["responsive", "hover", "focus"], | ||
backgroundPosition: ["responsive"], | ||
backgroundRepeat: ["responsive"], | ||
backgroundSize: ["responsive"], | ||
borderCollapse: ["responsive"], | ||
borderColor: ["responsive", "hover", "focus"], | ||
borderRadius: ["responsive"], | ||
borderStyle: ["responsive"], | ||
borderWidth: ["responsive"], | ||
cursor: ["responsive"], | ||
backgroundColor: ["hover", "focus", "group-hover"], | ||
backgroundPosition: [], | ||
backgroundRepeat: [], | ||
backgroundSize: [], | ||
borderCollapse: [], | ||
borderColor: ["hover", "focus", "group-hover"], | ||
borderRadius: [], | ||
borderStyle: [], | ||
borderWidth: [], | ||
cursor: [], | ||
display: ["responsive"], | ||
@@ -364,9 +364,9 @@ flexDirection: ["responsive"], | ||
order: ["responsive"], | ||
float: ["responsive"], | ||
fontFamily: ["responsive"], | ||
fontWeight: ["responsive"], | ||
float: [], | ||
fontFamily: [], | ||
fontWeight: [], | ||
height: ["responsive"], | ||
lineHeight: ["responsive"], | ||
listStylePosition: ["responsive"], | ||
listStyleType: ["responsive"], | ||
lineHeight: [], | ||
listStylePosition: [], | ||
listStyleType: [], | ||
margin: ["responsive"], | ||
@@ -377,31 +377,31 @@ maxHeight: ["responsive"], | ||
minWidth: ["responsive"], | ||
objectFit: ["responsive"], | ||
objectPosition: ["responsive"], | ||
opacity: ["responsive", "hover"], | ||
outline: ["responsive", "focus"], | ||
objectFit: [], | ||
objectPosition: [], | ||
opacity: ["hover"], | ||
outline: ["focus"], | ||
overflow: ["responsive"], | ||
padding: ["responsive"], | ||
pointerEvents: ["responsive"], | ||
pointerEvents: [], | ||
position: ["responsive"], | ||
inset: ["responsive"], | ||
resize: ["responsive"], | ||
resize: [], | ||
boxShadow: ["responsive", "hover", "focus"], | ||
fill: ["responsive"], | ||
stroke: ["responsive"], | ||
tableLayout: ["responsive"], | ||
fill: [], | ||
stroke: [], | ||
tableLayout: [], | ||
textAlign: ["responsive"], | ||
textColor: ["responsive", "hover", "focus"], | ||
textColor: ["responsive", "hover", "focus", "group-hover"], | ||
fontSize: ["responsive"], | ||
fontStyle: ["responsive"], | ||
textTransform: ["responsive"], | ||
textDecoration: ["responsive", "hover", "focus"], | ||
fontSmoothing: ["responsive"], | ||
letterSpacing: ["responsive"], | ||
userSelect: ["responsive"], | ||
verticalAlign: ["responsive"], | ||
visibility: ["responsive"], | ||
whitespace: ["responsive"], | ||
fontStyle: [], | ||
textTransform: [], | ||
textDecoration: ["hover", "focus", "group-hover"], | ||
fontSmoothing: [], | ||
letterSpacing: [], | ||
userSelect: [], | ||
verticalAlign: [], | ||
visibility: [], | ||
whitespace: [], | ||
wordBreak: ["responsive"], | ||
width: ["responsive"], | ||
zIndex: ["responsive"] | ||
zIndex: [] | ||
}, | ||
@@ -408,0 +408,0 @@ corePlugins: { |
Sorry, the diff of this file is not supported yet
381447
18749