Skip to content

Commit 9abb119

Browse files
Fix LabeledValue contextual help alignment for side label (#3568)
* align label and contextualhelp for side position * Revert "align label and contextualhelp for side position" This reverts commit 6a4e8a0. * fix alignment * add chromatic story Co-authored-by: Robert Snow <[email protected]>
1 parent 959a7c5 commit 9abb119

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

packages/@adobe/spectrum-css-temp/components/fieldlabel/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ governing permissions and limitations under the License.
214214

215215
&.spectrum-Field--positionSide {
216216
align-items: first baseline;
217+
218+
.spectrum-Field-contextualHelp {
219+
position: relative;
220+
top: var(--spectrum-global-dimension-size-40);
221+
}
217222
}
218223

219224
&.spectrum-Field--positionTop {

packages/@react-spectrum/labeledvalue/chromatic/LabeledValue.chromatic.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,18 @@ export let WithContextualHelp: LabeledValueStory = {
133133
},
134134
name: 'contextual help'
135135
};
136+
137+
export let LabelPostionSideWithContextualHelp: LabeledValueStory = {
138+
args: {
139+
label: 'Test',
140+
value: 25,
141+
labelPosition: 'side',
142+
contextualHelp: (
143+
<ContextualHelp>
144+
<Heading>What is a segment?</Heading>
145+
<Content>Segments identify who your visitors are, what devices and services they use, where they navigated from, and much more.</Content>
146+
</ContextualHelp>
147+
)
148+
},
149+
name: 'contextual help, labelPosition: side'
150+
};

0 commit comments

Comments
 (0)