rework modal component to add support for block level version in addition to programmatic version
add key press support to modal.