react-swipeable-button
Advanced tools
Comparing version
@@ -18,2 +18,3 @@ import React, { Component } from "react"; | ||
sliderTextColor?: string; | ||
textColor?: string; | ||
sliderIconColor?: string; | ||
@@ -20,0 +21,0 @@ background_color?: string; |
@@ -130,3 +130,3 @@ "use strict"; | ||
render() { | ||
const { width = 300, height = 50, circle = false, disabled = false, noAnimate = false, autoWidth = false, name = "react-swipeable-button", color, sliderColor, background_color = "#eee", borderRadius = 30, sliderTextColor = "#fff", sliderIconColor = "#fff", } = this.props; | ||
const { width = 300, height = 50, circle = false, disabled = false, noAnimate = false, autoWidth = false, name = "react-swipeable-button", color, sliderColor, background_color = "#eee", borderRadius = 30, sliderTextColor = "#fff", sliderIconColor = "#fff", textColor = "#000", } = this.props; | ||
const finalSliderColor = sliderColor || color || "#16362d"; | ||
@@ -157,3 +157,3 @@ // Log a warning if the deprecated color prop is used | ||
react_1.default.createElement("span", { className: "rsbcSliderCircle", style: { background: finalSliderColor } })), | ||
react_1.default.createElement("div", { className: "rsbcText" }, this.getText())))); | ||
react_1.default.createElement("div", { className: "rsbcText", style: { color: textColor } }, this.getText())))); | ||
} | ||
@@ -160,0 +160,0 @@ } |
@@ -18,2 +18,3 @@ import React, { Component } from "react"; | ||
sliderTextColor?: string; | ||
textColor?: string; | ||
sliderIconColor?: string; | ||
@@ -20,0 +21,0 @@ background_color?: string; |
@@ -105,3 +105,3 @@ import React, { Component } from "react"; | ||
render() { | ||
const { width = 300, height = 50, circle = false, disabled = false, noAnimate = false, autoWidth = false, name = "react-swipeable-button", color, sliderColor, background_color = "#eee", borderRadius = 30, sliderTextColor = "#fff", sliderIconColor = "#fff", } = this.props; | ||
const { width = 300, height = 50, circle = false, disabled = false, noAnimate = false, autoWidth = false, name = "react-swipeable-button", color, sliderColor, background_color = "#eee", borderRadius = 30, sliderTextColor = "#fff", sliderIconColor = "#fff", textColor = "#000", } = this.props; | ||
const finalSliderColor = sliderColor || color || "#16362d"; | ||
@@ -132,5 +132,5 @@ // Log a warning if the deprecated color prop is used | ||
React.createElement("span", { className: "rsbcSliderCircle", style: { background: finalSliderColor } })), | ||
React.createElement("div", { className: "rsbcText" }, this.getText())))); | ||
React.createElement("div", { className: "rsbcText", style: { color: textColor } }, this.getText())))); | ||
} | ||
} | ||
//# sourceMappingURL=SwipeableButton.js.map |
{ | ||
"name": "react-swipeable-button", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "A component to create swipeable button in react", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -12,2 +12,7 @@ # react-swipeable-button | ||
**v1.3.0** | ||
- Added `textColor` props to customize the button text color. | ||
**v1.2.0** | ||
@@ -122,3 +127,4 @@ | ||
| sliderColor | String | "#16362d" | The color of the slider | | ||
| sliderTextColor | String | "#fff" | The color of the text | | ||
| sliderTextColor | String | "#fff" | The color of the Slider Text | | ||
| TextColor | String | "#000" | The color of the Text (without slider) | | ||
| sliderIconColor | String | "#fff" | The color of the icon | | ||
@@ -125,0 +131,0 @@ | background_color | String | "#eee" | The background color of the container | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
44840
1.22%696
0.29%147
4.26%