@rmwc/icon
Advanced tools
Comparing version 2.2.0 to 2.2.2
@@ -36,2 +36,4 @@ import * as React from 'react'; | ||
render?: (content: any) => React.ReactNode | null; | ||
/** A size to render the icon */ | ||
size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'; | ||
}; |
@@ -26,32 +26,2 @@ [ | ||
"description": "Additional Icon Options. See the Icon component documentation." | ||
}, | ||
"iconSize": { | ||
"flowType": { | ||
"name": "union", | ||
"raw": "'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'", | ||
"elements": [ | ||
{ | ||
"name": "literal", | ||
"value": "'xsmall'" | ||
}, | ||
{ | ||
"name": "literal", | ||
"value": "'small'" | ||
}, | ||
{ | ||
"name": "literal", | ||
"value": "'medium'" | ||
}, | ||
{ | ||
"name": "literal", | ||
"value": "'large'" | ||
}, | ||
{ | ||
"name": "literal", | ||
"value": "'xlarge'" | ||
} | ||
] | ||
}, | ||
"required": false, | ||
"description": "" | ||
} | ||
@@ -58,0 +28,0 @@ }, |
@@ -12,3 +12,2 @@ import { SimpleTagPropsT } from '@rmwc/base/simpleTag'; | ||
iconOptions?: IconOptionsT; | ||
iconSize?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'; | ||
} & DeprecatedIconPropsT & SimpleTagPropsT; | ||
@@ -15,0 +14,0 @@ /** |
@@ -114,3 +114,2 @@ 'use strict'; | ||
iconOptions = _props$iconOptions === undefined ? {} : _props$iconOptions, | ||
iconSize = _props.iconSize, | ||
use = _props.use, | ||
@@ -122,3 +121,3 @@ children = _props.children, | ||
basename = _props.basename, | ||
rest = _objectWithoutProperties(_props, ['icon', 'iconOptions', 'iconSize', 'use', 'children', 'render', 'strategy', 'prefix', 'basename']); | ||
rest = _objectWithoutProperties(_props, ['icon', 'iconOptions', 'use', 'children', 'render', 'strategy', 'prefix', 'basename']); | ||
@@ -160,3 +159,3 @@ if (use !== undefined || children !== undefined) { | ||
content: content, | ||
className: (0, _classnames2.default)('rmwc-icon', basenameToUse, rest.className, iconClassName, _defineProperty({}, 'rmwc-icon--size-' + (iconSize || ''), !!iconSize)) | ||
className: (0, _classnames2.default)('rmwc-icon', basenameToUse, rest.className, iconClassName, _defineProperty({}, 'rmwc-icon--size-' + (iconOptions.size || ''), !!iconOptions.size)) | ||
})); | ||
@@ -163,0 +162,0 @@ } |
{ | ||
"name": "@rmwc/icon", | ||
"version": "2.2.0", | ||
"version": "2.2.2", | ||
"description": "RMWC Icon component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -86,7 +86,7 @@ # Icons `RMWC Addon` | ||
<Icon icon="favorite" iconSize="xsmall" /> {/* 18px */} | ||
<Icon icon="favorite" iconSize="small" /> {/* 20px */} | ||
<Icon icon="favorite" iconSize="medium" /> {/* 24px */} | ||
<Icon icon="favorite" iconSize="large" /> {/* 36px */} | ||
<Icon icon="favorite" iconSize="xlarge" /> {/* 48px */} | ||
<Icon icon="favorite" iconOptions={{size: "xsmall"}} /> {/* 18px */} | ||
<Icon icon="favorite" iconOptions={{size: "small"}} /> {/* 20px */} | ||
<Icon icon="favorite" iconOptions={{size: "medium"}} /> {/* 24px */} | ||
<Icon icon="favorite" iconOptions={{size: "large"}} /> {/* 36px */} | ||
<Icon icon="favorite" iconOptions={{size: "xlarge"}} /> {/* 48px */} | ||
``` | ||
@@ -93,0 +93,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
30796
304