Skip to content

Commit a253670

Browse files
authored
fix(picker): add picker attribute to nested popover and styles to constrain to picker width (#5767)
* fix(picker): add picker attribute to nested popover and styles to constrain to picker width * chore(picker): address pr feedback * chore(picker): set icon only + icon story story picker width * chore(picker): update golden hash
1 parent cdb42c7 commit a253670

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ parameters:
2222
# 3. Commit this change to the PR branch where the changes exist.
2323
current_golden_images_hash:
2424
type: string
25-
default: b603e40ceec985d714ea7660266908aa5476ced1
25+
default: 9b2f918bdfb7a5d90ac435f9cb103a9d35c263c9
2626
wireit_cache_name:
2727
type: string
2828
default: wireit

packages/picker/src/picker.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
@import url("./picker-overrides.css");
1515

1616
:host {
17+
--mod-popover-inline-size: var(--mod-picker-inline-size, var(--spectrum-picker-inline-size));
18+
1719
display: inline-flex;
1820
vertical-align: top;
1921

packages/picker/stories/picker.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ export const iconValue = (args: StoryArgs): TemplateResult => {
430430
@change=${handleChange(args)}
431431
label="Pick an action"
432432
icons="only"
433-
style="width: 100px"
434433
value="2"
434+
style="--mod-picker-inline-size: 100px;"
435435
>
436436
<sp-menu-item value="1">
437437
<sp-icon-edit slot="icon"></sp-icon-edit>
@@ -459,8 +459,8 @@ export const iconsOnly = (args: StoryArgs): TemplateResult => {
459459
id="picker-quiet"
460460
@change=${handleChange(args)}
461461
label="Pick an action"
462-
style="width: 100px"
463462
value="3"
463+
style="--mod-picker-inline-size: 100px;"
464464
>
465465
<sp-menu-item value="1">
466466
<sp-icon-edit slot="icon" label="Edit"></sp-icon-edit>

packages/popover/src/popover.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
min-width: min-content;
1818
max-height: 100%;
1919
max-width: 100%;
20+
inline-size: var(--mod-popover-inline-size);
2021
clip-path: none;
2122
}
2223

0 commit comments

Comments
 (0)