Skip to content

Commit

Permalink
Add restriction-lock-opacity variable
Browse files Browse the repository at this point in the history
  • Loading branch information
iantrich committed Jun 26, 2020
1 parent 7e9a908 commit 77621a5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Can be specified by color name, hexadecimal, rgb, rgba, hsl, hsla, basically any
| `restriction-lock-row-margin-left` | `24px` | Manually bump the left margin of the lock icon in rows |
| `restriction-lock-icon-height` | `24px` | Lock icon height |
| `restriction-lock-icon-width` | `24px` | Lock icon width |
| `restriction-lock-opacity` | `0.5` | Lock icon opacity |

## Example Configurations

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "restriction-card",
"version": "1.2.0",
"version": "1.2.1",
"description": "Lovelace restriction-card",
"keywords": [
"home-assistant",
Expand Down Expand Up @@ -48,4 +48,4 @@
"lint": "eslint src/*.ts",
"rollup": "rollup -c"
}
}
}
2 changes: 1 addition & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const CARD_VERSION = '1.2.0';
export const CARD_VERSION = '1.2.1';
3 changes: 2 additions & 1 deletion src/restriction-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ class RestrictionCard extends LitElement implements LovelaceCard {
--lock-row-margin-left: var(--restriction-lock-row-margin-left, 24px);
--lock-icon-height: var(--restriction-lock-icon-height, var(--iron-icon-height, 24px));
--lock-icon-width: var(--restriction-lock-icon-width, var(--iron-icon-width, 24px));
--lock-opacity: var(--restriction-lock-opacity, 0.5);
}
ha-icon {
--iron-icon-height: var(--lock-icon-height);
Expand All @@ -237,7 +238,6 @@ class RestrictionCard extends LitElement implements LovelaceCard {
#overlay {
align-items: flex-start;
padding: 8px 7px;
opacity: 0.5;
position: absolute;
left: 0;
right: 0;
Expand All @@ -252,6 +252,7 @@ class RestrictionCard extends LitElement implements LovelaceCard {
}
#lock {
margin-left: var(--lock-margin-left);
opacity: var(--lock-opacity);
}
.row {
margin-left: var(--lock-row-margin-left) !important;
Expand Down

0 comments on commit 77621a5

Please sign in to comment.