Skip to content

Commit 5489c18

Browse files
emilybrickfrancinelucca
authored andcommitted
Adding margin around notice styles (#5881)
Co-authored-by: Marie Lucca <[email protected]> Co-authored-by: Marie Lucca <[email protected]>
1 parent b436be7 commit 5489c18

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

.changeset/twenty-crabs-try.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/react": patch
3+
---
4+
5+
fix(SelectPanel): Add margin around notice styles
Loading

e2e/components/SelectPanel.test.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,29 @@ test.describe('SelectPanel', () => {
133133
`SelectPanel-Default-responsive-width-light-modern-action-list--true-full-screen-on-narrow--true.png`,
134134
)
135135
})
136+
137+
test(`Default @vrt with notice`, async ({page}) => {
138+
await visit(page, {
139+
id: 'components-selectpanel-features--with-notice',
140+
globals: {
141+
featureFlags: {
142+
primer_react_select_panel_with_modern_action_list: true,
143+
},
144+
},
145+
})
146+
147+
// Open select panel
148+
const isPanelOpen = await page.isVisible('[role="listbox"]')
149+
if (!isPanelOpen) {
150+
await page.keyboard.press('Tab')
151+
await page.keyboard.press('Tab')
152+
await page.keyboard.press('Tab')
153+
await page.keyboard.press('Tab')
154+
await page.keyboard.press('Enter')
155+
}
156+
157+
expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot(
158+
`SelectPanel-features--with-notice-light-modern-action-list--true.png`,
159+
)
160+
})
136161
})

packages/react/src/SelectPanel/SelectPanel.module.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@
3737
padding-bottom: var(--base-size-12);
3838
padding-left: var(--base-size-16);
3939
margin-top: var(--base-size-4);
40+
margin-right: var(--base-size-8);
41+
margin-left: var(--base-size-8);
4042
font-size: var(--text-body-size-small);
4143
flex-direction: row;
42-
border-top: var(--borderWidth-thin) solid;
43-
border-bottom: var(--borderWidth-thin) solid;
44+
border: var(--borderWidth-thin) solid;
4445
gap: var(--base-size-8);
46+
border-radius: var(--borderRadius-medium);
4547
}
4648

4749
.Notice a {

0 commit comments

Comments
 (0)