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.
@mcwv/button
Advanced tools
<mdc-button @click="onClick" :disabled="buttonDisabled">click me</mdc-button>
var vm = new Vue({
data:{
buttonDisabled: false
},
methods: {
onClick () {...}
}
})
event | args | Description |
---|---|---|
@click | emitted on click |
prop | Type | Default | Description |
---|---|---|---|
disabled | String | disable the button | |
raised | Boolean | a contained button that is elevated upon the surface | |
unelevated | Boolean | a contained button that is flush with the surface | |
outlined | Boolean | a contained button that is flush with the surface and has a visible border(*) | |
dense | String | compresses the button text to make it slightly smaller | |
event | String | optional | optional event to emit on click |
event-target | Object | vm.$root | optional event target, defaults to root bus |
event-args | Array | [] | optional event args |
href | String | link's href, renders anchor (see notes below) | |
to | String, Object | undefined | router-link property (*) |
replace | Boolean | false | router-link property (*) |
append | Boolean | false | router-link property (*) |
exact | Boolean | false | router-link property (*) |
active-class | String | router-link-active | router-link property (*) |
exact-active-class | String | router-link-exact-active | router-link property (*) |
(*) Requires vue-router
<mdc-button>Baseline</mdc-button>
<mdc-button dense>Dense</mdc-button>
<mdc-button raised>Baseline</mdc-button>
<mdc-button raised dense>Dense</mdc-button>
<mdc-button unelevated>Baseline</mdc-button>
<mdc-button unelevated dense>Dense</mdc-button>
<mdc-button ><i class="material-icons mdc-button__icon">favorite</i>like</mdc-button>
or an SVG button
<mdc-button > <svg class="mdc-button__icon" xmlns="http://www.w3.org/2000/svg" viewBox="...">
...
</svg>
like
</mdc-button>
Note:
mdc-icon
is not suitable for rendering in anmdc-button
as it does not set the requiredmdc-button__icon
class.
Using the href attribute will render <a role="button" href="...">
<mdc-button href="#">Home</mdc-button>
If the to
property is defined, the item behaves as a
router-link
<mdc-button to="/home">Home</mdc-button>
Buttons are expected to be triggered using the Space or Enter key, while links are expected to be triggered using the Enter key. Additionally, button and links have different behaviors on right click. see this MDN note
You might want to keep button behaviour and do the navigation programatically:
<mdc-button @click="location.href='#'">Home</mdc-button>
<mdc-button @click="$router.push(...)">Home</mdc-button>
<mdc-button event='my-event'>Do Something</mdc-button>
// register event from some component context
this.$root.$on('my-event', () => doSomething())
FAQs
The Vue Material Adapter for the web button component
The npm package @mcwv/button receives a total of 2 weekly downloads. As such, @mcwv/button popularity was classified as not popular.
We found that @mcwv/button demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.