@aleodoni-common/tailwind-components
Advanced tools
Comparing version 1.0.33 to 1.0.35
import React, { ButtonHTMLAttributes } from 'react'; | ||
import * as SolidIcons from '@heroicons/react/solid'; | ||
import * as OutlineIcons from '@heroicons/react/outline'; | ||
export declare type IconName = keyof typeof SolidIcons | keyof typeof OutlineIcons; | ||
declare type IconName = keyof typeof SolidIcons | keyof typeof OutlineIcons; | ||
interface IButton extends ButtonHTMLAttributes<HTMLButtonElement> { | ||
aleodoni_ringcolor?: string; | ||
aleodoni_inputicon?: IconName; | ||
aleodoni_buttonicon?: IconName; | ||
aleodoni_outlineicon?: boolean; | ||
} | ||
export declare const Input: React.FC<IButton>; | ||
export declare const Button: React.FC<IButton>; | ||
export {}; |
import React, { InputHTMLAttributes } from 'react'; | ||
import * as SolidIcons from '@heroicons/react/solid'; | ||
import * as OutlineIcons from '@heroicons/react/outline'; | ||
export declare type IconName = keyof typeof SolidIcons | keyof typeof OutlineIcons; | ||
declare type IconName = keyof typeof SolidIcons | keyof typeof OutlineIcons; | ||
interface IInput extends InputHTMLAttributes<HTMLInputElement> { | ||
@@ -6,0 +6,0 @@ aleodoni_ringcolor?: string; |
@@ -5,2 +5,3 @@ import './tailwind.css'; | ||
export * from './components/input'; | ||
export * from './components/button'; | ||
export * from './util/classnames'; |
@@ -53,2 +53,26 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var Button = function Button(props) { | ||
var aleodoni_buttonicon = props.aleodoni_buttonicon, | ||
_props$aleodoni_ringc = props.aleodoni_ringcolor, | ||
aleodoni_ringcolor = _props$aleodoni_ringc === void 0 ? 'blue-500' : _props$aleodoni_ringc, | ||
_props$aleodoni_outli = props.aleodoni_outlineicon, | ||
aleodoni_outlineicon = _props$aleodoni_outli === void 0 ? false : _props$aleodoni_outli; | ||
var pH = aleodoni_buttonicon ? 'pl-8 pr-3' : 'px-3'; | ||
var TheIcon; | ||
if (aleodoni_buttonicon) { | ||
TheIcon = aleodoni_outlineicon ? OutlineIcons[aleodoni_buttonicon] : SolidIcons[aleodoni_buttonicon]; | ||
} | ||
var className = "w-full " + pH + " py-2 border rounded-md border-gray-300 focus:outline-none focus:ring-4 focus:ring-" + aleodoni_ringcolor; | ||
return React.createElement("div", { | ||
className: "flex p-10 items-center text-gray-300 focus-within:text-gray-500" | ||
}, TheIcon && React.createElement(TheIcon, { | ||
className: "pointer-events-none w-5 h-5 absolute mx-2" | ||
}), React.createElement("button", Object.assign({ | ||
type: "button", | ||
className: className | ||
}, props))); | ||
}; | ||
var classNames = function classNames() { | ||
@@ -62,2 +86,3 @@ for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) { | ||
exports.Button = Button; | ||
exports.Container = Container; | ||
@@ -64,0 +89,0 @@ exports.Input = Input; |
@@ -51,2 +51,26 @@ import React from 'react'; | ||
var Button = function Button(props) { | ||
var aleodoni_buttonicon = props.aleodoni_buttonicon, | ||
_props$aleodoni_ringc = props.aleodoni_ringcolor, | ||
aleodoni_ringcolor = _props$aleodoni_ringc === void 0 ? 'blue-500' : _props$aleodoni_ringc, | ||
_props$aleodoni_outli = props.aleodoni_outlineicon, | ||
aleodoni_outlineicon = _props$aleodoni_outli === void 0 ? false : _props$aleodoni_outli; | ||
var pH = aleodoni_buttonicon ? 'pl-8 pr-3' : 'px-3'; | ||
var TheIcon; | ||
if (aleodoni_buttonicon) { | ||
TheIcon = aleodoni_outlineicon ? OutlineIcons[aleodoni_buttonicon] : SolidIcons[aleodoni_buttonicon]; | ||
} | ||
var className = "w-full " + pH + " py-2 border rounded-md border-gray-300 focus:outline-none focus:ring-4 focus:ring-" + aleodoni_ringcolor; | ||
return React.createElement("div", { | ||
className: "flex p-10 items-center text-gray-300 focus-within:text-gray-500" | ||
}, TheIcon && React.createElement(TheIcon, { | ||
className: "pointer-events-none w-5 h-5 absolute mx-2" | ||
}), React.createElement("button", Object.assign({ | ||
type: "button", | ||
className: className | ||
}, props))); | ||
}; | ||
var classNames = function classNames() { | ||
@@ -60,3 +84,3 @@ for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) { | ||
export { Container, Input, Screen, classNames }; | ||
export { Button, Container, Input, Screen, classNames }; | ||
//# sourceMappingURL=index.modern.js.map |
{ | ||
"name": "@aleodoni-common/tailwind-components", | ||
"version": "1.0.33", | ||
"version": "1.0.35", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37549
847