armstrong-react-types
Advanced tools
Comparing version 1.0.0-alpha.28 to 1.0.0-alpha.29
/// <reference types="react" /> | ||
import * as React from "react"; | ||
export interface ICheckboxInputProps extends React.HTMLProps<CheckboxInput> { | ||
label: string; | ||
labelContent: string | React.ReactElement<any>; | ||
} | ||
@@ -6,0 +6,0 @@ export declare class CheckboxInput extends React.Component<ICheckboxInputProps, {}> { |
@@ -23,7 +23,7 @@ "use strict"; | ||
CheckboxInput.prototype.render = function () { | ||
var id = "radio_" + Math.random(); | ||
var id = "checkbox_" + Math.random(); | ||
return (React.createElement("div", {className: "checkbox"}, | ||
React.createElement("input", __assign({id: id}, _.omit(this.props, "label"), {type: "checkbox"})), | ||
React.createElement("input", __assign({id: id}, _.omit(this.props, "labelContent"), {type: "checkbox"})), | ||
React.createElement("label", {htmlFor: id}), | ||
React.createElement("label", {className: "checkbox-label", htmlFor: id}, this.props.label))); | ||
React.createElement("label", {className: "checkbox-label", htmlFor: id}, this.props.labelContent))); | ||
}; | ||
@@ -30,0 +30,0 @@ return CheckboxInput; |
{ | ||
"name": "armstrong-react", | ||
"version": "1.0.0-alpha.28", | ||
"version": "1.0.0-alpha.29", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "classnames": { |
{ | ||
"name": "armstrong-react-types", | ||
"version": "1.0.0-alpha.28", | ||
"version": "1.0.0-alpha.29", | ||
"description": "Rocketmakers Armstrong library of React components (For projects using npm @types from Typescript 2.0)", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -53,2 +53,6 @@ <p align="center"> | ||
#### Form - Checkbox | ||
CheckboxInput now takes "labelContent" which can be a string or a component. Previously it only supported a "label" string | ||
## Introduction | ||
@@ -55,0 +59,0 @@ |
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
500562
126