Marking this as a draft so we can discuss whether we prefer to go this route or to make a smaller version of Button. See #444.
This PR updates the InlineAlert to remove the close button from the document flow, positioning it with position: absolute and a negative top value to center it.
The advantage of this approach is that we retain the 32px x 32px click target size for the close button, rather than rolling a smaller button. The disadvantage is that the code is more hacky and less declarative than using a smaller button and keeping the current InlineAlert code.
Marking this as a draft so we can discuss whether we prefer to go this route or to make a smaller version of
Button
. See #444.This PR updates the
InlineAlert
to remove the close button from the document flow, positioning it withposition: absolute
and a negativetop
value to center it.The advantage of this approach is that we retain the 32px x 32px click target size for the close button, rather than rolling a smaller button. The disadvantage is that the code is more hacky and less declarative than using a smaller button and keeping the current
InlineAlert
code.Single line of text, before and after:
Multiple lines of text, before and after: