@@ -133,6 +134,40 @@ Default.args = {
),
};
+export const CardWithHeader = (args) => (
+
+
+
+
+ November 7, 2018
+ Order #12931820
+
+
+ Total
+ $623.98
+
+
+
+
+ Main content goes here.
+
+
+
+
+
+
+);
+
+CardWithHeader.args = {
+ background: SageTokens.COLOR_SLIDERS.GREY_200,
+};
+
+CardWithHeader.argTypes = {
+ ...selectArgs({
+ background: SageTokens.COLOR_SLIDERS
+ }),
+};
+
export const InteractiveCard = () => (
diff --git a/packages/sage-react/lib/Card/CardHeader.jsx b/packages/sage-react/lib/Card/CardHeader.jsx
new file mode 100644
index 0000000000..35dd84c5ab
--- /dev/null
+++ b/packages/sage-react/lib/Card/CardHeader.jsx
@@ -0,0 +1,44 @@
+import React from 'react';
+import PropTypes, { oneOfType } from 'prop-types';
+import { SageTokens } from '../configs';
+
+export const CardHeader = ({ background, children, ...rest }) => {
+ const { style } = rest;
+ const styles = style || {};
+
+ const hasCustomBackground = background
+ && !Object.values(SageTokens.COLOR_SLIDERS).includes(background);
+
+ if (hasCustomBackground) {
+ styles['--sage-card-background'] = background;
+ }
+
+ return (
+ x).join(' ')
+ }
+ {...rest}
+ style={styles}
+ >
+ {children}
+
+ );
+};
+
+CardHeader.defaultProps = {
+ background: SageTokens.COLOR_SLIDERS.GREY_200,
+ children: null,
+};
+
+CardHeader.propTypes = {
+ background: oneOfType([
+ PropTypes.string,
+ PropTypes.oneOf(Object.values(SageTokens.COLOR_SLIDERS)),
+ ]),
+ children: PropTypes.node,
+};
diff --git a/packages/sage-react/lib/Label/Label.jsx b/packages/sage-react/lib/Label/Label.jsx
index 81244a9fd7..2c75b68f94 100644
--- a/packages/sage-react/lib/Label/Label.jsx
+++ b/packages/sage-react/lib/Label/Label.jsx
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
-import { SageTokens } from '../configs';
+import { SageTokens, SageClassnames } from '../configs';
import {
LABEL_COLORS,
LABEL_STYLES,
@@ -61,13 +61,19 @@ export const Label = React.forwardRef(({
type={interactiveType ? 'button' : null}
{...rest}
>
+ {icon && (
+
+ )}
{value}
{interactiveType === LABEL_INTERACTIVE_TYPES.SECONDARY_BUTTON && secondaryButton}
{(interactiveType === LABEL_INTERACTIVE_TYPES.DROPDOWN) && (
-
+
)}
);