Renaming type property to theme
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user