Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add margin-top for "lock" in a card #148

Merged
merged 12 commits into from
Feb 20, 2025
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';