Skip to content

Commit f4315f3

Browse files
authored
Fix helptext alignment inheriting (#2367)
1 parent a688ea0 commit f4315f3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
.spectrum-HelpText {
3333
display: flex;
34+
text-align: start;
3435
font-size: var(--spectrum-helptext-neutral-texticon-text-size);
3536
.spectrum-HelpText-validationIcon {
3637
margin-inline-end: var(--spectrum-helptext-neutral-texticon-icon-gap);

packages/@react-spectrum/label/stories/HelpText.stories.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,15 @@ storiesOf('HelpText', module)
122122
.add(
123123
'description and custom description',
124124
() => renderCustomDescription({description: 'Password must be at least 8 characters.'})
125+
)
126+
.add(
127+
'container with text alignment set',
128+
() => (
129+
<Flex direction="column" gap="size-200" UNSAFE_style={{textAlign: 'center'}}>
130+
<TextField label="Password" description="Enter a single digit number." />
131+
<TextField label="Password 2" errorMessage="Create a password with at least 8 characters." validationState="invalid" />
132+
</Flex>
133+
)
125134
);
126135

127136
function render(props: SpectrumTextFieldProps = {}) {

0 commit comments

Comments
 (0)