I'm making a presentation using ioslides_presentation and am embedding an interactive map using Leaflet. The white box used to toggle different layers has a lot of unnecessary white space. This is not an issue when making the output an html_document or just showing the map in the R console. Is there a way to reduce the white space in the box/reduce the size of the box when using ioslides_presentation?
---
title: "Leaflet in ioslides"
output:
ioslides_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Leaflet
```{r, echo=F, message=F, warning=F}
library(raster)
library(leaflet)
rwa_adm0 <- getData('GADM', country='RWA', level=0)
rwa_adm1 <- getData('GADM', country='RWA', level=1)
leaflet() %>%
addProviderTiles("OpenStreetMap") %>%
addPolygons(data=rwa_adm0, group="ADM 0") %>%
addPolygons(data=rwa_adm0, group="ADM 1") %>%
addLayersControl(overlayGroups = c("ADM 0", "ADM 1"),
options = layersControlOptions(collapsed = FALSE))
```
Leaflet output: