Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
org.webjars.bower:github-com-PolymerElements-paper-toast
Advanced tools
Material design: Snackbars & toasts
paper-toast
provides a subtle notification toast. Only one paper-toast
will
be visible on screen.
Use opened
to show the toast:
Example:
<paper-toast text="Hello world!" opened></paper-toast>
Also open()
or show()
can be used to show the toast:
Example:
<paper-button on-click="openToast">Open Toast</paper-button>
<paper-toast id="toast" text="Hello world!"></paper-toast>
...
openToast: function() {
this.$.toast.open();
}
Set duration
to 0, a negative number or Infinity to persist the toast on screen:
Example:
<paper-toast text="Terms and conditions" opened duration="0">
<a href="#">Show more</a>
</paper-toast>
<paper-toast>
is affected by the stacking context of its container. Adding <paper-toast>
inside elements that create a new stacking context - e.g. <app-drawer>
, <app-layout>
or <iron-list>
- might result in toasts partially obstructed or clipped. Add <paper-toast>
to the top level (<body>
) element, outside the structure, e.g.:
<!-- ... -->
</app-drawer-layout>
<paper-toast id="toast"></paper-toast>
</template>
You can then use custom events to communicate with it from within child components, using addEventListener
and dispatchEvent
.
The following custom properties and mixins are available for styling:
Custom property | Description | Default |
---|---|---|
--paper-toast-background-color | The paper-toast background-color | #323232 |
--paper-toast-color | The paper-toast color | #f1f1f1 |
This element applies the mixin --paper-font-common-base
but does not import paper-styles/typography.html
.
In order to apply the Roboto
font to this element, make sure you've imported paper-styles/typography.html
.
FAQs
WebJar for paper-toast
We found that org.webjars.bower:github-com-PolymerElements-paper-toast demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.