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

@material/icon-toggle

Package Overview
Dependencies
Maintainers
13
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/icon-toggle - npm Package Compare versions

Comparing version 0.40.0 to 0.40.1

10

package.json
{
"name": "@material/icon-toggle",
"description": "The Material Components for the web icon toggle component",
"version": "0.40.0",
"version": "0.40.1",
"license": "MIT",

@@ -17,7 +17,7 @@ "keywords": [

"dependencies": {
"@material/animation": "^0.39.0",
"@material/base": "^0.39.0",
"@material/ripple": "^0.40.0",
"@material/theme": "^0.40.0"
"@material/animation": "^0.40.1",
"@material/base": "^0.40.1",
"@material/ripple": "^0.40.1",
"@material/theme": "^0.40.1"
}
}

@@ -45,6 +45,5 @@ <!--docs:

## Usage
## Basic Usage
In order to use MDC Icon Toggle, you will need to import an icon set, such as
[Material Icons](https://design.google.com/icons/) or [Font Awesome](http://fontawesome.io/).
### HTML Structure

@@ -60,3 +59,3 @@ ```html

Then in JS
Then in JS:

@@ -76,5 +75,20 @@ ```js

### Using with Font Awesome and similar libraries
### Icon set
Font Awesome - as well as other popular icon font libraries - use pseudo-elements in order to
In order to use MDC Icon Toggle, you will need to import an icon set.
We recommend using [Material Icons](https://material.io/tools/icons/) from Google Fonts:
```html
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
```
However, you can use any icon set you like! See the [Font Awesome section](#font-awesome) below for details.
<a id="font-awesome"></a>
#### Using with Font Awesome and similar libraries
[Font Awesome](https://fontawesome.com/) and other popular icon font libraries use pseudo-elements in order to
provide the icon, via the `content` property. However, MDC Web uses pseudo-elements for ripple styles.

@@ -154,3 +168,3 @@ In order to get around this, you can nest the icon itself inside the icon toggle.

### MDCIconToggle API
### `MDCIconToggle` API

@@ -160,3 +174,3 @@ Similar to regular DOM elements, the `MDCIconToggle` functionality is exposed through accessor

#### MDCIconToggle.on
#### `MDCIconToggle.on`

@@ -166,3 +180,3 @@ Boolean. Returns whether or not the icon toggle is currently toggled on. Setting this property

#### MDCIconToggle.disabled
#### `MDCIconToggle.disabled`

@@ -206,3 +220,3 @@ Boolean. Returns whether or not the icon toggle is currently disabled. Setting this property will

##### MDCIconToggleFoundation.refreshToggleData() => void
##### `MDCIconToggleFoundation.refreshToggleData() => void`

@@ -214,7 +228,7 @@ As described above, the `data-toggle-*` attributes are cached so as not to have to perform redundant

##### MDCIconToggleFoundation.isOn() => boolean
##### `MDCIconToggleFoundation.isOn() => boolean`
Returns true if the foundation's state is toggled on, false otherwise.
##### MDCIconToggleFoundation.toggle(isOn: boolean = !this.isOn()) => void
##### `MDCIconToggleFoundation.toggle(isOn: boolean = !this.isOn()) => void`

@@ -225,14 +239,14 @@ Toggles the foundation's state, updating the component via the adapter methods. Defaults to the

##### MDCIconToggleFoundation.isDisabled() => boolean
##### `MDCIconToggleFoundation.isDisabled() => boolean`
Returns true if the foundation's state is disabled, false otherwise.
Returns `true` if the foundation's state is disabled, `false` otherwise.
##### MDCIconToggleFoundation.setDisabled(isDisabled: boolean) => void
##### `MDCIconToggleFoundation.setDisabled(isDisabled: boolean) => void`
Enables / disables the foundation's state, updating the component via the adapter methods.
##### MDCIconToggleFoundation.isKeyboardActivated() => boolean
##### `MDCIconToggleFoundation.isKeyboardActivated() => boolean`
Returns true if the foundation is currently activated by a keyboard event, false otherwise.
Useful for MDCRippleFoundation's `isSurfaceActive()` adapter method.
Returns `true` if the foundation is currently activated by a keyboard event, `false` otherwise.
Useful for the `MDCRippleFoundation.isSurfaceActive()` adapter method.

@@ -239,0 +253,0 @@ ### Sass Mixins

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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