Props: content <MessageComponent content="Success!"></MessageComponent> | Props: children <Message>Success!</Message> | The content prop in EJ2 React is replaced in React by directly passing content as children to the Message component. |
Props: cssClass <MessageComponent cssClass="custom-message"></MessageComponent> | Props: className <Message className="custom-message"></Message> | The cssClass prop in EJ2 React is replaced with the standard React className prop in React. |
Props: severity <MessageComponent severity="Success"></MessageComponent> | Props: severity <Message severity={Severity.Success}></Message> | The severity prop in EJ2 React accepts both string and enum values (e.g., "Success" or Severity.Success).
In React, the severity prop supports only enum values from the Severity enum (e.g., Severity.Success, Severity.Error). |
Props: variant <MessageComponent variant="text"></MessageComponent> | Props: variant <Message variant={Variant.Text}></Message> | The variant prop in EJ2 React accepts both string and enum values (e.g., "text" or Variant.Text).
In React, the variant prop supports only enum values from the Variant enum (e.g., Variant.Text, Variant.Outlined). |
Props: showIcon <MessageComponent showIcon={true}></MessageComponent> | Props: icon <Message icon={true}></Message> | The showIcon prop in EJ2 React is replaced with the icon prop in React, which also supports rendering a custom SVG icon. |
Props: visible <MessageComponent visible={true}></MessageComponent> | Props: visible <Message visible={true}></Message> | The visible prop is supported in both EJ2 React and React. In React, you can also use standard React conditional rendering as an alternative approach. |
Props: showCloseIcon <MessageComponent showCloseIcon={true}></MessageComponent> | Props: closeIcon <Message closeIcon={true}></Message> | The showCloseIcon prop in EJ2 React is replaced with the closeIcon prop in React, which also supports rendering a custom SVG icon. |
Props: enableRtl <MessageComponent enableRtl={true}></MessageComponent> |
<Provider dir={'rtl'}>
<Message closeIcon={true}></Message>
<Provider> | The enableRtl prop in EJ2 React is replaced in React by wrapping the component with a Provider that includes the dir="rtl" attribute to enable RTL support. |
Props: locale <MessageComponent locale='en-US'></MessageComponent> |
<Provider locale={'en-US'}>
<Message closeIcon={true}></Message>
<Provider> | The locale prop in EJ2 React is replaced in React by wrapping the component with a Provider that includes the locale="en-US" attribute to apply the locale. |