@storybook/design-system
Advanced tools
Comparing version 7.15.9 to 7.15.10-canary.42d5cce.0
import React, { FunctionComponent } from 'react'; | ||
import { color } from './shared/styles'; | ||
type Status = 'default' | 'positive' | 'negative' | 'warning' | 'neutral' | 'link' | 'inverse'; | ||
type Size = 'small' | 'large'; | ||
type Alignment = 'left' | 'center' | 'right'; | ||
type Color = keyof typeof color; | ||
export interface CardinalProps { | ||
@@ -16,2 +18,3 @@ isLoading?: boolean; | ||
status?: Status; | ||
countColor?: Color; | ||
noPlural?: boolean; | ||
@@ -18,0 +21,0 @@ CountWrapper?: React.ElementType; |
@@ -28,3 +28,3 @@ "use strict"; | ||
var _excluded = ["isLoading", "selectable", "onHover", "onClick", "active", "size", "count", "countLink", "text", "noPlural", "status", "CountWrapper", "TextWrapper", "alignment"]; | ||
var _excluded = ["isLoading", "selectable", "onHover", "onClick", "active", "size", "count", "countLink", "text", "noPlural", "status", "countColor", "CountWrapper", "TextWrapper", "alignment"]; | ||
@@ -59,2 +59,4 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } | ||
return props.status === 'inverse' && _ref3; | ||
}, ";", function (props) { | ||
return props.status === 'default' && props.countColor && /*#__PURE__*/(0, _theming.css)("color:", _styles.color[props.countColor], ";" + (process.env.NODE_ENV === "production" ? "" : ";label:Count;")); | ||
}, ";span{display:inline-block;}"); | ||
@@ -136,2 +138,3 @@ var Text = /*#__PURE__*/(0, _theming.styled)("div", process.env.NODE_ENV === "production" ? { | ||
status = _ref4.status, | ||
countColor = _ref4.countColor, | ||
CountWrapper = _ref4.CountWrapper, | ||
@@ -172,3 +175,4 @@ TextWrapper = _ref4.TextWrapper, | ||
}, events, props), /*#__PURE__*/_react["default"].createElement(Count, { | ||
status: status | ||
status: status, | ||
countColor: countColor | ||
}, /*#__PURE__*/_react["default"].createElement(CountWrapper, null, countValue)), /*#__PURE__*/_react["default"].createElement(Text, null, /*#__PURE__*/_react["default"].createElement(TextWrapper, null, !noPlural && typeof count === 'number' ? (0, _pluralize["default"])(text, count) : text))); | ||
@@ -196,2 +200,3 @@ }; | ||
status: 'default', | ||
countColor: null, | ||
count: '000', | ||
@@ -198,0 +203,0 @@ countLink: null, |
{ | ||
"name": "@storybook/design-system", | ||
"version": "7.15.9", | ||
"version": "7.15.10-canary.42d5cce.0", | ||
"description": "Storybook design system", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
863910
13226
2
310