If there isn't a reason for that, it'd be helpful to allow arbitrary content. (The design for our app currently has alerts with more complex content.)
Note also that children is currently placed inside a p element. A p element only allows phrasing content as children, so some elements (div, ul, dl etc) are not valid children of p.
Description
Currently
children
in Alert is typed asstring
:https://github.com/Royal-Navy/design-system/blob/ab175e02beaa4e7e6fea7992766f5dbab620cbd4/packages/react-component-library/src/components/Alert/Alert.tsx#L40
If there isn't a reason for that, it'd be helpful to allow arbitrary content. (The design for our app currently has alerts with more complex content.)
Note also that
children
is currently placed inside ap
element. Ap
element only allows phrasing content as children, so some elements (div
,ul
,dl
etc) are not valid children ofp
.