@eturnity/eturnity_reusable_components 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -5,6 +5,7 @@
5
5
  :size="size"
6
6
  :hasLabel="!!label.length"
7
7
  :backgroundColor="backgroundColor"
8
+ :isChecked="isChecked"
8
9
  >{{ label }}
9
10
  <input-checkbox
10
11
  type="checkbox"
@@ -38,6 +39,7 @@ const containerAttrs = {
38
39
  size: String,
39
40
  hasLabel: Boolean,
40
41
  backgroundColor: String,
42
+ isChecked: Boolean,
41
43
  }
42
44
  const Container = styled("label", containerAttrs)`
43
45
  display: grid;
@@ -68,9 +70,17 @@ const Container = styled("label", containerAttrs)`
68
70
  ? "16px"
69
71
  : "25px"};
70
72
  background-color: ${(props) =>
71
- props.backgroundColor ? props.backgroundColor : props.theme.colors.green};
73
+ props.isChecked
74
+ ? "#fff"
75
+ : props.backgroundColor
76
+ ? props.backgroundColor
77
+ : props.theme.colors.green};
72
78
  border-radius: 4px;
73
- border: 1px solid ${(props) => props.theme.colors.mediumGray};
79
+ border: 1px solid
80
+ ${(props) =>
81
+ props.isChecked && props.backgroundColor
82
+ ? props.backgroundColor
83
+ : props.theme.colors.mediumGray};
74
84
 
75
85
  &:after {
76
86
  content: "";