Skip to content

Commit

Permalink
Update ui.R
Browse files Browse the repository at this point in the history
update the margin and padding for the buttons
  • Loading branch information
pingfan-hu committed Sep 11, 2024
1 parent d41e07a commit 03e6ec6
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions R/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,14 @@ sd_next <- function(next_page = NULL, label = "Next") {
button_id <- make_next_button_id(next_page)

shiny::tagList(
shiny::actionButton(
inputId = button_id,
label = label,
style = "display: block; margin: auto;",
onclick = sprintf("Shiny.setInputValue('next_page', '%s');", next_page)
shiny::div(
style = "margin-top: 0.5rem;",
shiny::actionButton(
inputId = button_id,
label = label,
style = "display: block; margin: auto;",
onclick = sprintf("Shiny.setInputValue('next_page', '%s');", next_page)
)
),
shiny::tags$script(shiny::HTML(enter_key_js(button_id)))
)
Expand Down Expand Up @@ -358,15 +361,15 @@ create_redirect_element <- function(id, url, button, label, delay) {
text-align: center;
border: 1px solid #ddd;
border-radius: 5px;
padding: 0.5rem 1rem;
padding: 0.5rem 0.5rem;
background-color: #f9f9f9;
margin: 0.5rem 0;
margin: 0.5rem 0.5rem;
"

# Wrapper for centering the container
wrapper_style <- "
text-align: center;
margin: 1rem 0;
margin: 0.5rem 0.5rem;
"

# Create button or text element
Expand Down

0 comments on commit 03e6ec6

Please sign in to comment.