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

@gemsorg/modules

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gemsorg/modules - npm Package Compare versions

Comparing version 0.1.23 to 0.1.24

4

package.json
{
"name": "@gemsorg/modules",
"version": "0.1.23",
"version": "0.1.24",
"description": "gems modules",

@@ -29,3 +29,3 @@ "main": "index.js",

},
"gitHead": "ea6506b15ff46bc73f3efecf06b43c3d492848d3"
"gitHead": "93425338e881cd35b054dbd9e72c3f0939029759"
}

@@ -23,2 +23,3 @@ import React, { Component } from 'react';

value: PropTypes.string,
initial: PropTypes.string,
onChange: PropTypes.func.isRequired,

@@ -30,2 +31,3 @@ };

value: '',
initial: null,
label: null,

@@ -37,4 +39,7 @@ placeholder: '',

state = { touched: false };
handleChange = ({ target }) => {
const { name, onChange } = this.props;
this.setState({ touched: true });
onChange(name, target.value);

@@ -44,3 +49,7 @@ };

render() {
const { inputType, placeholder, label, value } = this.props;
const { inputType, placeholder, label, value, initial } = this.props;
const { touched } = this.state;
const val = !value && !touched && initial ? initial : value;
return (

@@ -52,3 +61,3 @@ <Label className={styles.label} label={label}>

onChange={this.handleChange}
value={value}
value={val}
autoComplete="off"

@@ -55,0 +64,0 @@ placeholder={placeholder}

@@ -30,2 +30,6 @@ // @flow

},
initial: {
type: PropControlTypes.string,
placeholder: 'Default value',
},
label: {

@@ -32,0 +36,0 @@ type: PropControlTypes.string,

@@ -21,4 +21,5 @@

| *label* | string | - | - | text label |
| *initial* | string | - | - | initial value |
| *[validation](https://gemsorg.github.io/gems-components/?selectedKind=Form%20Builder&selectedStory=Validation)* | validtion | - | - | validation rules |
## Playground
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