MCPcopy Create free account
hub / github.com/adobe/react-spectrum / FieldErrorIcon

Function FieldErrorIcon

packages/@react-spectrum/s2/src/Field.tsx:477–510  ·  view source on GitHub ↗
(props: {isDisabled?: boolean})

Source from the content-addressed store, hash-verified

475}
476
477export function FieldErrorIcon(props: {isDisabled?: boolean}): ReactNode {
478 return (
479 <Provider
480 values={[
481 [
482 IconContext,
483 {
484 render: centerBaseline({
485 slot: 'icon',
486 styles: style({
487 order: 0,
488 flexShrink: 0,
489 '--iconPrimary': {
490 type: 'fill',
491 value: {
492 default: 'negative',
493 forcedColors: 'Mark'
494 }
495 }
496 })
497 }),
498 styles: style({
499 size: '1lh',
500 marginStart: 'text-to-visual',
501 marginEnd: fontRelative(-2),
502 flexShrink: 0
503 })
504 }
505 ]
506 ]}>
507 {!props.isDisabled && <AlertIcon />}
508 </Provider>
509 );
510}

Callers

nothing calls this directly

Calls 2

centerBaselineFunction · 0.90
fontRelativeFunction · 0.90

Tested by

no test coverage detected