Renaming type property to theme

This commit is contained in:
Jeff Avallone
2018-02-17 11:23:20 -05:00
parent 3ead0c13df
commit e04e4edc1f
3 changed files with 18 additions and 18 deletions
+3 -3
View File
@@ -44,11 +44,11 @@ class Box extends Base {
labelRef = label => this.label = label
render() {
const { type, radius, label, children } = this.props;
const { theme, radius, label, children } = this.props;
const { width, height, labelTransform, rectTransform, contentTransform } = this.state || {};
const rectProps = {
style: type ? style[type] : {},
style: style[theme],
width,
height,
rx: radius,
@@ -79,7 +79,7 @@ Box.propTypes = {
padding: PropTypes.number,
useAnchors: PropTypes.bool,
radius: PropTypes.number,
type: PropTypes.string
theme: PropTypes.string
};
export default Box;
+3 -3
View File
@@ -37,11 +37,11 @@ class Text extends Base {
}
render() {
const { type } = this.props;
const { theme } = this.props;
const { transform } = this.state || {};
const textProps = {
style: { ...style.text, ...(type ? style[type] : {}) },
style: { ...style.text, ...style[theme] },
transform,
ref: this.textRef
};
@@ -59,7 +59,7 @@ Text.propTypes = {
]).isRequired,
quoted: PropTypes.bool,
transform: PropTypes.string,
type: PropTypes.string
theme: PropTypes.string
};
export default Text;