@artistry/react
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -8,2 +8,3 @@ import * as React from 'react'; | ||
width?: number | string; | ||
stacked?: boolean; | ||
} | ||
@@ -10,0 +11,0 @@ export default class CardControl extends React.Component<ICardControlProps, any> { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const React = require("react"); | ||
const ClassNames_1 = require("../util/ClassNames"); | ||
class CardControl extends React.Component { | ||
render() { | ||
let { id, className, title, label, width } = this.props; | ||
let classNames = className ? [className] : []; | ||
classNames.push('card-control'); | ||
let { id, className, title, label, width, stacked } = this.props; | ||
let classNames = new ClassNames_1.default(className, 'card-control'); | ||
classNames.addTest('card-control-stacked', stacked); | ||
if (width && typeof width === 'number') { | ||
@@ -16,6 +17,6 @@ width += 'px'; | ||
if (label) { | ||
return (React.createElement("label", { className: classNames.join(' '), id: id, style: { '--card-control-min-width': width } }, content)); | ||
return (React.createElement("label", { className: classNames.toString(), id: id, style: { '--card-control-min-width': width } }, content)); | ||
} | ||
else { | ||
return (React.createElement("div", { className: classNames.join(' '), id: id, style: { '--card-control-min-width': width } }, content)); | ||
return (React.createElement("div", { className: classNames.toString(), id: id, style: { '--card-control-min-width': width } }, content)); | ||
} | ||
@@ -22,0 +23,0 @@ } |
{ | ||
"name": "@artistry/react", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "A powerful component library for React", | ||
@@ -5,0 +5,0 @@ "repository": "https://www.github.com/sjohnsonaz/artistry-react.git", |
246646
6113