Add `canDimiss` to control dismiss behavior.