@s-ui/react-atom-label
Advanced tools
Comparing version
@@ -32,2 +32,6 @@ import type { FC, LabelHTMLAttributes } from 'react'; | ||
fontSize?: FontSize; | ||
/** | ||
* class attribute | ||
*/ | ||
className?: string; | ||
} | ||
@@ -34,0 +38,0 @@ declare const AtomLabel: FC<AtomLabelProps>; |
@@ -1,1 +0,1 @@ | ||
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import cx from"classnames";import{CLASSNAME,FONT_SIZES,TYPES}from"./settings";var getClass=function(param){var inline=param.inline,type=param.type,fontSize=param.fontSize;var _obj;return cx(CLASSNAME,(_obj={},_obj[CLASSNAME+"--"+fontSize]=Boolean(fontSize),_obj[CLASSNAME+"--"+type]=Boolean(type),_obj[""+CLASSNAME+"--inlineLeft"]=inline==="left",_obj[""+CLASSNAME+"--inlineRight"]=inline==="right",_obj))};var AtomLabel=function(param){var name=param.name,text=param.text,inline=param.inline,optionalText=param.optionalText,type=param.type,fontSize=param.fontSize,htmlFor=param.htmlFor,onClick=param.onClick;return _jsxs("label",{htmlFor:htmlFor!=null?htmlFor:name,className:getClass({inline:inline,type:type,fontSize:fontSize}),onClick:onClick,children:[text,Boolean(optionalText)&&_jsx("span",{className:"sui-AtomLabel-optionalText",children:optionalText})]})};AtomLabel.displayName="AtomLabel";export default AtomLabel;export{FONT_SIZES as AtomLabelFontSizes};export{TYPES as AtomLabelTypes}; | ||
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import cx from"classnames";import{CLASSNAME,FONT_SIZES,TYPES}from"./settings";var getClass=function(param){var inline=param.inline,type=param.type,fontSize=param.fontSize,className=param.className;var _obj;return cx(CLASSNAME,(_obj={},_obj[CLASSNAME+"--"+fontSize]=Boolean(fontSize),_obj[CLASSNAME+"--"+type]=Boolean(type),_obj[""+CLASSNAME+"--inlineLeft"]=inline==="left",_obj[""+CLASSNAME+"--inlineRight"]=inline==="right",_obj),className)};var AtomLabel=function(param){var name=param.name,text=param.text,inline=param.inline,optionalText=param.optionalText,type=param.type,fontSize=param.fontSize,htmlFor=param.htmlFor,onClick=param.onClick,className=param.className;return _jsxs("label",{htmlFor:htmlFor!=null?htmlFor:name,className:getClass({inline:inline,type:type,fontSize:fontSize,className:className}),onClick:onClick,children:[text,Boolean(optionalText)&&_jsx("span",{className:"sui-AtomLabel-optionalText",children:optionalText})]})};AtomLabel.displayName="AtomLabel";export default AtomLabel;export{FONT_SIZES as AtomLabelFontSizes};export{TYPES as AtomLabelTypes}; |
{ | ||
"name": "@s-ui/react-atom-label", | ||
"version": "1.25.0", | ||
"version": "1.26.0", | ||
"description": "", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"keywords": [ | ||
"@s-ui", | ||
"react", | ||
"component", | ||
"atom", | ||
"label" | ||
], | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"prepublishOnly": "npm run build:js && npm run build:styles", | ||
"prepublishOnly": "rimraf ./lib && npm run build:js && npm run build:styles", | ||
"build:js": "sui-js-compiler", | ||
@@ -15,5 +25,17 @@ "build:styles": "cpx './src/**/*.scss' ./lib" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/SUI-Components/sui-components", | ||
"directory": "components/atom/label" | ||
}, | ||
"config": { | ||
"title": "label", | ||
"category": "atom", | ||
"type": "components" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/SUI-Components/sui-components/issues?q=is%3Aopen+label%3A%22Component%3A+label%22" | ||
}, | ||
"homepage": "https://sui-components.vercel.app/", | ||
"license": "MIT" | ||
} |
@@ -5,2 +5,9 @@ # AtomLabel | ||
[](https://sui-components.vercel.app/workbench/atom/label/) | ||
[](https://github.com/SUI-Components/sui-components/issues/new?&projects=4&template=bug-report.yml&assignees=&template=report-a-bug.yml&title=🪲+&labels=bug,component,atom,label) | ||
[](https://www.npmjs.com/package/@s-ui/react-atom-label) | ||
[](https://github.com/SUI-Components/sui-components/issues?q=is%3Aopen+label%3Acomponent+label%3Alabel) | ||
[](https://github.com/SUI-Components/sui-components/blob/main/components/atom/label/LICENSE.md) | ||
## Installation | ||
@@ -7,0 +14,0 @@ |
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
8929
45.16%13
8.33%80
5.26%1
-50%1
-50%42
20%0
-100%