Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rmwc/icon-button

Package Overview
Dependencies
Maintainers
1
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rmwc/icon-button - npm Package Compare versions

Comparing version 8.0.8 to 14.0.0-alpha.0

9

dist/index.js

@@ -16,3 +16,3 @@ "use strict";

}
return react_1.default.createElement(IconButtonRoot, tslib_1.__assign({ tag: "button" }, rest, { ref: ref }));
return react_1.default.createElement(IconButtonRoot, tslib_1.__assign({}, rest, { ref: ref }));
});

@@ -23,2 +23,3 @@ var IconButtonToggle = base_1.createComponent(function IconButtonToggle(props, ref) {

return (react_1.default.createElement(IconButtonToggleRoot, tslib_1.__assign({ "aria-pressed": isOn }, rootEl.props(rest), { tag: "button", ref: ref }),
react_1.default.createElement("div", { className: "mdc-icon-button__ripple" }),
react_1.default.createElement(IconButtonIcon, { icon: icon }),

@@ -34,3 +35,3 @@ react_1.default.createElement(IconButtonIcon, { icon: onIcon, on: true })));

})(base_1.createComponent(function IconButtonRoot(props, ref) {
var checked = props.checked, label = props.label, foundationRef = props.foundationRef, rest = tslib_1.__rest(props, ["checked", "label", "foundationRef"]);
var checked = props.checked, label = props.label, foundationRef = props.foundationRef, children = props.children, icon = props.icon, rest = tslib_1.__rest(props, ["checked", "label", "foundationRef", "children", "icon"]);
var className = base_1.useClassNames(props, [

@@ -42,3 +43,5 @@ 'mdc-icon-button',

]);
return (react_1.default.createElement(icon_1.Icon, tslib_1.__assign({ role: "button", tabIndex: 0, "aria-label": label }, rest, { className: className, ref: ref })));
return (react_1.default.createElement(base_1.Tag, tslib_1.__assign({ tag: "button", role: "button", tabIndex: 0, "aria-label": label }, rest, { className: className, ref: ref }),
react_1.default.createElement("div", { className: "mdc-icon-button__ripple" }),
react_1.default.createElement(icon_1.Icon, tslib_1.__assign({ icon: icon }, rest, { tag: "i" }))));
}));

@@ -45,0 +48,0 @@ var IconButtonToggleRoot = ripple_1.withRipple({

@@ -1,3 +0,3 @@

/// <reference types="react" />
export default function Readme(): JSX.Element;
export declare const galleryExample: JSX.Element;
import React from 'react';
export default function Readme(): React.JSX.Element;
export declare const galleryExample: React.JSX.Element;

@@ -13,3 +13,3 @@ import { __assign, __rest } from "tslib";

}
return React.createElement(IconButtonRoot, __assign({ tag: "button" }, rest, { ref: ref }));
return React.createElement(IconButtonRoot, __assign({}, rest, { ref: ref }));
});

@@ -20,2 +20,3 @@ var IconButtonToggle = createComponent(function IconButtonToggle(props, ref) {

return (React.createElement(IconButtonToggleRoot, __assign({ "aria-pressed": isOn }, rootEl.props(rest), { tag: "button", ref: ref }),
React.createElement("div", { className: "mdc-icon-button__ripple" }),
React.createElement(IconButtonIcon, { icon: icon }),

@@ -31,3 +32,3 @@ React.createElement(IconButtonIcon, { icon: onIcon, on: true })));

})(createComponent(function IconButtonRoot(props, ref) {
var checked = props.checked, label = props.label, foundationRef = props.foundationRef, rest = __rest(props, ["checked", "label", "foundationRef"]);
var checked = props.checked, label = props.label, foundationRef = props.foundationRef, children = props.children, icon = props.icon, rest = __rest(props, ["checked", "label", "foundationRef", "children", "icon"]);
var className = useClassNames(props, [

@@ -39,3 +40,5 @@ 'mdc-icon-button',

]);
return (React.createElement(Icon, __assign({ role: "button", tabIndex: 0, "aria-label": label }, rest, { className: className, ref: ref })));
return (React.createElement(Tag, __assign({ tag: "button", role: "button", tabIndex: 0, "aria-label": label }, rest, { className: className, ref: ref }),
React.createElement("div", { className: "mdc-icon-button__ripple" }),
React.createElement(Icon, __assign({ icon: icon }, rest, { tag: "i" }))));
}));

@@ -42,0 +45,0 @@ var IconButtonToggleRoot = withRipple({

@@ -1,3 +0,3 @@

/// <reference types="react" />
export default function Readme(): JSX.Element;
export declare const galleryExample: JSX.Element;
import React from 'react';
export default function Readme(): React.JSX.Element;
export declare const galleryExample: React.JSX.Element;
{
"name": "@rmwc/icon-button",
"version": "8.0.8",
"version": "14.0.0-alpha.0",
"description": "RMWC IconButton component",

@@ -39,9 +39,9 @@ "main": "dist/index.js",

"dependencies": {
"@material/icon-button": "^8.0.0",
"@rmwc/base": "^8.0.8",
"@rmwc/icon": "^8.0.8",
"@rmwc/ripple": "^8.0.8",
"@rmwc/types": "^8.0.8"
"@material/icon-button": "^14.0.0",
"@rmwc/base": "^14.0.0-alpha.0",
"@rmwc/icon": "^14.0.0-alpha.0",
"@rmwc/ripple": "^14.0.0-alpha.0",
"@rmwc/types": "^14.0.0-alpha.0"
},
"gitHead": "d9befec0e3b258864b71686eecd16c16feb43cf1"
}

@@ -49,22 +49,24 @@ # Icon Buttons

```jsx
function Controlled() {
const [isChecked, setIsChecked] = React.useState(false);
return (
<>
<IconButton
checked={isChecked}
onClick={() => setIsChecked(!isChecked)}
onIcon="star"
icon="star_border"
/>
<>
{function Controlled() {
const [isChecked, setIsChecked] = React.useState(false);
return (
<>
<IconButton
checked={isChecked}
onClick={() => setIsChecked(!isChecked)}
onIcon="star"
icon="star_border"
/>
<IconButton
checked={isChecked}
onClick={() => setIsChecked(!isChecked)}
onIcon="images/icons/twitter.png"
icon="images/icons/facebook.png"
/>
</>
);
}
<IconButton
checked={isChecked}
onClick={() => setIsChecked(!isChecked)}
onIcon="images/icons/twitter.png"
icon="images/icons/facebook.png"
/>
</>
);
}}
</>
```

@@ -71,0 +73,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc