Skip to content

Commit

Permalink
Fix/label z index (#1423)
Browse files Browse the repository at this point in the history
* fix: set label zindex to 1 to fix chrome autofill hidden issue

* doc change

* update snapshot
  • Loading branch information
luizrochaecore authored Nov 30, 2023
1 parent 6fab46f commit 0b47ffd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "pcln-design-system",
"comment": "add zindex 1 to label to fix autofill label hiding issue",
"type": "patch"
}
],
"packageName": "pcln-design-system"
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ exports[`FormField disabled state renders input with icon - disabled 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
font-size: 10px;
margin-left: 40px;
Expand Down Expand Up @@ -263,6 +264,7 @@ exports[`FormField disabled state renders select with icon - disabled 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
font-size: 10px;
margin-left: 40px;
Expand Down Expand Up @@ -448,6 +450,7 @@ exports[`FormField renders 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
font-size: 10px;
margin-left: 12px;
Expand Down Expand Up @@ -619,6 +622,7 @@ exports[`FormField renders with Icon 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
font-size: 10px;
margin-left: 40px;
Expand Down Expand Up @@ -812,6 +816,7 @@ exports[`FormField renders with Label autoHide prop 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
font-size: 10px;
margin-left: 40px;
Expand Down Expand Up @@ -998,6 +1003,7 @@ exports[`FormField renders with Select 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
font-size: 10px;
margin-left: 12px;
Expand Down Expand Up @@ -1195,6 +1201,7 @@ exports[`FormField renders with Select and Icon 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
font-size: 10px;
margin-left: 40px;
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/Label/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const Label: React.FC<ILabelProps> & { isLabel?: boolean } = styled.label.attrs(
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: ${getPaletteColor('base')};
${(props) => (props.bg ? `background-color: ${getPaletteColor(props.bg, 'base')(props)};` : '')}
${(props) => (props.onClick ? 'cursor: pointer;' : '')}
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/Label/__snapshots__/Label.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exports[`Label Label hidden renders 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
position: absolute;
width: 1px;
Expand Down Expand Up @@ -35,6 +36,7 @@ exports[`Label Label nowrap renders 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
white-space: nowrap;
font-weight: 700;
Expand All @@ -60,6 +62,7 @@ exports[`Label Label width renders 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
white-space: nowrap;
width: 50%;
Expand Down Expand Up @@ -87,6 +90,7 @@ exports[`Label it renders 1`] = `
display: block;
width: 100%;
margin: 0;
z-index: 1;
color: #4f6f8f;
font-weight: 700;
font-size: 10px;
Expand Down

0 comments on commit 0b47ffd

Please sign in to comment.