
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
react-currency-input-mask
Advanced tools
Input field preformated for displaying currencies, percents etc.
ReactJS simple currency input field
npm i react-currency-input-mask --save
https://gitlab.com/damjan89/react-money
React >= 16.9.0
import * as React from 'react'
import ReactMoneyComponent from 'react-currency-input-mask'
import 'react-currency-input-mask/src/assets/style.css'
class IndexComponent extends React.Component {
constructor(props:any) {
super(props);
this.state = {
price: 2.2,
config: {
prefix: '$',
suffix: '%',
precision: 2,
className: 'yourClassName',
decimalSeparator: ',',
}
}
}
/*
* Name: changePrice
* Description: This function is called when user change input value
* Parameters: price(changed Price)
* author: Nick Dam
* */
changePrice(price:number){
this.setState({price: price})
}
render () {
return (
<div>
<p>{this.state.price}</p>
<ReactMoneyComponent
value={this.state.price}
config={this.state.config}
onChange={(e:any) => this.changePrice(e)}><
/ReactMoneyComponent>
</div>
)
}
}
In this.state.config add your class name!
To style input field:
.yourClassName .reactMoneyInput {
//yourStyle
}
To style prefix:
.yourClassName .reactMoneyInputGroupPrepend {
//yourStyle
}
To style suffix:
.yourClassName .reactMoneyInputGroupAppend {
//yourStyle
}
MIT © Nick Dam
FAQs
Input field preformated for displaying currencies, percents etc.
The npm package react-currency-input-mask receives a total of 23 weekly downloads. As such, react-currency-input-mask popularity was classified as not popular.
We found that react-currency-input-mask 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.