@aleodoni-common/tailwind-components
Advanced tools
Comparing version 1.0.14 to 1.0.16
import React, { InputHTMLAttributes } from 'react'; | ||
interface IInput extends InputHTMLAttributes<HTMLInputElement> { | ||
ringColor?: string; | ||
icon?: JSX.Element; | ||
} | ||
export declare const Input: React.FC<IInput>; | ||
export {}; |
@@ -26,9 +26,10 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var Input = function Input(props) { | ||
var _props$ringColor = props.ringColor, | ||
ringColor = _props$ringColor === void 0 ? 'blue-300' : _props$ringColor; | ||
var icon = props.icon, | ||
_props$ringColor = props.ringColor, | ||
ringColor = _props$ringColor === void 0 ? 'blue-500' : _props$ringColor; | ||
var className = "w-full px-3 py-2 border rounded-md border-gray-300 placeholder-gray-300 text-gray-900 focus:outline-none focus:ring-4 focus:ring-" + ringColor; | ||
return React.createElement("input", Object.assign({ | ||
return React.createElement("div", null, icon && icon, React.createElement("input", Object.assign({ | ||
type: "text", | ||
className: className | ||
}, props)); | ||
}, props))); | ||
}; | ||
@@ -35,0 +36,0 @@ |
@@ -24,9 +24,10 @@ import React from 'react'; | ||
var Input = function Input(props) { | ||
var _props$ringColor = props.ringColor, | ||
ringColor = _props$ringColor === void 0 ? 'blue-300' : _props$ringColor; | ||
var icon = props.icon, | ||
_props$ringColor = props.ringColor, | ||
ringColor = _props$ringColor === void 0 ? 'blue-500' : _props$ringColor; | ||
var className = "w-full px-3 py-2 border rounded-md border-gray-300 placeholder-gray-300 text-gray-900 focus:outline-none focus:ring-4 focus:ring-" + ringColor; | ||
return React.createElement("input", Object.assign({ | ||
return React.createElement("div", null, icon && icon, React.createElement("input", Object.assign({ | ||
type: "text", | ||
className: className | ||
}, props)); | ||
}, props))); | ||
}; | ||
@@ -33,0 +34,0 @@ |
{ | ||
"name": "@aleodoni-common/tailwind-components", | ||
"version": "1.0.14", | ||
"version": "1.0.16", | ||
"main": "./build/index.js", | ||
@@ -5,0 +5,0 @@ "module": "build/index.modern.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
25660
710