Skip to content

Commit 61232c8

Browse files
committed
fix: updated screenshots
1 parent 1b26b9d commit 61232c8

17 files changed

Lines changed: 43 additions & 73 deletions

packages/pattern-lock-v1/src/__snapshots__/component.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exports[`PatternLockV1 test Snapshot tests should match snapshot 1`] = `
99
class="message"
1010
/>
1111
<div
12-
class="forgotBtn forgotBtn hiddenBtn"
12+
class="forgotBtnContainer forgotBtnContainer hiddenBtn"
1313
/>
1414
</div>
1515
</div>
@@ -26,7 +26,7 @@ exports[`PatternLockV1 test Snapshot tests should match snapshot with error prop
2626
Error message
2727
</div>
2828
<div
29-
class="forgotBtn forgotBtn hiddenBtn"
29+
class="forgotBtnContainer forgotBtnContainer hiddenBtn"
3030
/>
3131
</div>
3232
</div>

packages/pattern-lock-v1/src/components/base-pattern-lock/Component.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,14 @@ export const BasePatternLock = forwardRef<
126126
extraBounds={extraBounds}
127127
hover={hover}
128128
/>
129-
130-
{showForgotCodeBtn ? (
131-
<div className={cn(commonStyles.forgotBtnContainer, styles.forgotBtnContainer)}>
129+
<div
130+
className={cn(
131+
commonStyles.forgotBtnContainer,
132+
styles.forgotBtnContainer,
133+
styles.hiddenBtn,
134+
)}
135+
>
136+
{showForgotCodeBtn && (
132137
<ButtonMobile
133138
view='transparent'
134139
className={cn(commonStyles.forgotBtn, styles.forgotBtn)}
@@ -137,14 +142,8 @@ export const BasePatternLock = forwardRef<
137142
>
138143
{forgotCodeBtnText}
139144
</ButtonMobile>
140-
</div>
141-
) : (
142-
<div
143-
className={cn(commonStyles.forgotBtn, styles.forgotBtn, {
144-
[styles.hiddenBtn]: Boolean(styles.hiddenBtn),
145-
})}
146-
/>
147-
)}
145+
)}
146+
</div>
148147
</div>
149148
);
150149
},

packages/pattern-lock-v1/src/components/base-pattern-lock/index.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
justify-content: center;
3434
}
3535

36+
.forgotBtnContainer,
3637
.forgotBtn.forgotBtn.forgotBtn {
3738
min-height: var(--size-xs-height);
3839
}

packages/pattern-lock-v1/src/mobile/mobile.module.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
.forgotBtnContainer {
1515
margin-top: var(--gap-32);
1616
}
17+
.forgotBtnContainer,
1718
.forgotBtn.forgotBtn.forgotBtn {
1819
min-height: var(--size-s-height);
1920
}
@@ -24,6 +25,7 @@
2425
}
2526

2627
@media screen and (min-width: 390px) {
28+
.forgotBtnContainer,
2729
.forgotBtn.forgotBtn.forgotBtn {
2830
min-height: var(--size-m-height);
2931
}
Lines changed: 2 additions & 2 deletions
Loading

packages/pattern-lock/src/__snapshots__/component.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`PatternLock test Snapshot tests should match snapshot 1`] = `
44
<div>
55
<div
6-
class="component component"
6+
class="component"
77
>
88
<div
99
class="canvasContainer"

packages/pattern-lock/src/components/base-pattern-lock/Component.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export const BasePatternLock = forwardRef<
3636
extraBounds = DEFAULT_EXTRA_BOUNDS,
3737
messageClassName,
3838
hover,
39-
styles = {},
4039
disabled = false,
4140
...restProps
4241
},
@@ -90,7 +89,7 @@ export const BasePatternLock = forwardRef<
9089

9190
return (
9291
<div
93-
className={cn(commonStyles.component, styles.component, className, {
92+
className={cn(commonStyles.component, className, {
9493
[commonStyles.hidden]: !params,
9594
[commonStyles.withForgotBtn]: showForgotCodeBtn,
9695
[commonStyles.disabled]: disabled,
@@ -112,14 +111,16 @@ export const BasePatternLock = forwardRef<
112111
</div>
113112
</div>
114113
{showForgotCodeBtn && (
115-
<ButtonMobile
116-
view='transparent'
117-
className={cn(commonStyles.forgotBtn, styles.forgotBtn)}
118-
onClick={onForgotBtnClick}
119-
dataTestId={getDataTestId(dataTestId, 'forgot-code-btn')}
120-
>
121-
{forgotCodeBtnText}
122-
</ButtonMobile>
114+
<div className={commonStyles.forgotBtnContainer}>
115+
<ButtonMobile
116+
view='transparent'
117+
size={40}
118+
onClick={onForgotBtnClick}
119+
dataTestId={getDataTestId(dataTestId, 'forgot-code-btn')}
120+
>
121+
{forgotCodeBtnText}
122+
</ButtonMobile>
123+
</div>
123124
)}
124125
</div>
125126
);

packages/pattern-lock/src/components/base-pattern-lock/index.module.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
min-height: var(--pattern-lock-with-forgot-btn-min-height);
3636
}
3737

38-
.forgotBtn {
39-
display: block;
40-
min-height: var(--size-xs-height);
38+
.forgotBtnContainer {
39+
display: flex;
40+
justify-content: center;
41+
margin: var(--gap-8) auto var(--gap-0);
4142
}

packages/pattern-lock/src/desktop/Component.desktop.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ import { type TPatternLockInstance } from '@alfalab/react-canvas-pattern-lock';
55
import { BasePatternLock } from '../components/base-pattern-lock';
66
import { type CommonPatternLockProps } from '../typings';
77

8-
import styles from './desktop.module.css';
9-
108
export const PatternLockDesktop = forwardRef<TPatternLockInstance, CommonPatternLockProps>(
11-
(restProps, ref) => <BasePatternLock {...restProps} hover={true} ref={ref} styles={styles} />,
9+
(restProps, ref) => <BasePatternLock {...restProps} hover={true} ref={ref} />,
1210
);
1311

1412
PatternLockDesktop.displayName = 'PatternLockDesktop';

packages/pattern-lock/src/desktop/desktop.module.css

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)