Skip to content

Commit 85ecf65

Browse files
authored
Move TextArea validation Icon to top right (#1543)
1 parent 602aa40 commit 85ecf65

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ governing permissions and limitations under the License.
211211
.spectrum-Textfield--invalid .spectrum-Textfield-validationIcon {
212212
width: var(--spectrum-icon-alert-medium-width);
213213
height: var(--spectrum-icon-alert-medium-height);
214-
bottom: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-icon-alert-medium-height) / 2));
214+
top: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-icon-alert-medium-height) / 2));
215215
inset-inline-end: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-icon-alert-medium-width) / 2));
216216
}
217217
.spectrum-Textfield--valid .spectrum-Textfield-validationIcon {
218218
width: var(--spectrum-icon-checkmark-medium-width);
219219
height: var(--spectrum-icon-checkmark-medium-height);
220-
bottom: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-icon-checkmark-medium-height) / 2));
220+
top: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-icon-checkmark-medium-height) / 2));
221221
inset-inline-end: var(--spectrum-global-dimension-size-150);
222222
}
223223

@@ -256,7 +256,7 @@ governing permissions and limitations under the License.
256256
/* same positioning as invalid icon */
257257
.spectrum-Textfield--loadable .spectrum-Textfield-circleLoader {
258258
position: absolute;
259-
bottom: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-loader-circle-small-width) / 2));
259+
top: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-loader-circle-small-width) / 2));
260260
/* can't use padding right since it breaks the circle loader so add here */
261261
inset-inline-end: calc(calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-icon-alert-medium-width) / 2)) + calc(var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2));
262262

packages/@react-spectrum/textfield/stories/TextArea.stories.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ storiesOf('TextArea', module)
137137
.add('controlled interactive',
138138
() => <ControlledTextArea />
139139
)
140-
.add('in flex', () => renderInFlexRowAndBlock());
140+
.add('in flex', () => renderInFlexRowAndBlock())
141+
.add('in flex validation state', () => renderInFlexRowAndBlock({validationState: 'invalid'}));
141142

142143
function render(props = {}) {
143144
return (

0 commit comments

Comments
 (0)