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

Function FieldErrorIcon

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

centerBaselineFunction · 0.90
fontRelativeFunction · 0.90

Tested by

no test coverage detected