Skip to content

Commit

Permalink
feat: Add margin-top for "lock" in a card (#148)
Browse files Browse the repository at this point in the history
* add top margin variable into Docs

* added note regarding "margin" variables

* version update
  • Loading branch information
ildar170975 authored Feb 20, 2025
1 parent 571a7c2 commit 1a57b46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ Can be specified by color name, hexadecimal, rgb, rgba, hsl, hsla, basically any
| `restriction-success-lock-color` | `primary-color` | Lock color when unlocked |
| `restriction-blocked-lock-color` | `error-state-color` | Lock color when card is blocked |
| `restriction-invalid-lock-color` | `error-state-color` | Lock color after an invalid attempt to unlock |
| `restriction-lock-margin-left` | `0px` | Manually bump the left margin of the lock icon (right for RTL) |
| `restriction-lock-row-margin-left` | `24px` | Manually bump the left margin of the lock icon in a row (right for RTL) |
| `restriction-lock-row-margin-top` | `0px` | Manually bump the top margin of the lock icon in a row |
| `restriction-lock-margin-left` | `0px` | Manually set the left margin of the lock icon (right for RTL) |
| `restriction-lock-margin-top` | `0px` | Manually set the top margin of the lock icon |
| `restriction-lock-row-margin-left` | `24px` | Manually set the left margin of the lock icon in a row (right for RTL) |
| `restriction-lock-row-margin-top` | `0px` | Manually set the top margin of the lock icon in a row |
| `restriction-lock-icon-size` | `24px` | Lock icon size |
| `restriction-lock-opacity` | `0.5` | Lock icon opacity |
| `restriction-overlay-background` | `unset` | Overlay background when locked |
Expand All @@ -132,6 +133,8 @@ Can be specified by color name, hexadecimal, rgb, rgba, hsl, hsla, basically any
| `restriction-overlay-row-outline-blocked` | `none` | Outline for an overlay in a row when blocked |
| `restriction-overlay-row-border-radius` | `0` | Border radius for an overlay in a row |

Note: it is not recommended to set negative values for `*-lock-*-margin-*` variables to prevent a "lock" icon to be clipped.

## Example Configurations

Simple Lock example
Expand Down
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.17';
export const CARD_VERSION = '1.2.18';

0 comments on commit 1a57b46

Please sign in to comment.