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

@s-ui/react-atom-validation-text

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@s-ui/react-atom-validation-text - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

25

CHANGELOG.md

@@ -5,1 +5,26 @@ # Change Log

# 1.2.0 (2020-01-30)
### Features
* add alert type ([8c9187a](https://github.com/SUI-Components/sui-components/commit/8c9187a06e45cc56ddbbf841fae7f3962e6c3555))
# 1.1.0 (2018-03-22)
### Bug Fixes
* add description and export the validation types ([a859c31](https://github.com/SUI-Components/sui-components/commit/a859c31a21c76b9d4756230e48ecd85f8d7eab0f))
* fix name component ([5998571](https://github.com/SUI-Components/sui-components/commit/5998571217e03b53a3ca314cfa7c5ba005ce0329))
### Features
* fix component name ([31f5480](https://github.com/SUI-Components/sui-components/commit/31f54807ae22f15a2d448dbd96571626867bd81b))
* new component atom validationText ([169fb87](https://github.com/SUI-Components/sui-components/commit/169fb87f457e0d8427bb1eef63a6b047e7ef6362))

52

lib/index.js

@@ -1,34 +0,13 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AtomValidationTextTypes = undefined;
var _values = require('babel-runtime/core-js/object/values');
var _values2 = _interopRequireDefault(_values);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
var BASE_CLASS = 'sui-AtomValidationText';
var TYPES = {
SUCCESS: 'success',
ERROR: 'error'
ERROR: 'error',
ALERT: 'alert'
};
var getClassNames = function getClassNames(type) {
return (0, _classnames2.default)(BASE_CLASS, BASE_CLASS + '--' + type);
return cx(BASE_CLASS, BASE_CLASS + "--" + type);
};

@@ -39,18 +18,9 @@

text = _ref.text;
return _react2.default.createElement(
'span',
{ className: getClassNames(type) },
text
);
return React.createElement("span", {
className: getClassNames(type)
}, text);
};
AtomValidationText.displayName = 'AtomValidationText';
AtomValidationText.propTypes = process.env.NODE_ENV !== "production" ? process.env.NODE_ENV !== "production" ? {
type: _propTypes2.default.oneOf((0, _values2.default)(TYPES)).isRequired,
text: _propTypes2.default.string.isRequired
} : {} : {};
exports.default = AtomValidationText;
exports.AtomValidationTextTypes = TYPES;
export default AtomValidationText;
export { TYPES as AtomValidationTextTypes };
{
"name": "@s-ui/react-atom-validation-text",
"version": "1.1.0",
"version": "1.2.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -15,2 +15,10 @@ # AtomValidationText

### Add text
Just add a text, set through the prop `text`.
### Types
There are defined 3 types (`success`, `error` and `alert`) available at the exported object `AtomValidationTextTypes` and that can be set through the prop `type`.
### Basic usage

@@ -20,3 +28,3 @@ ```js

return (<AtomValidationText />)
return (<AtomValidationText text="This is the text." type="alert" />)
```

@@ -23,0 +31,0 @@

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