Skip to content

Commit 3ea4c8e

Browse files
authored
Restrict icon/label separator spacing to actionButton() (#4247)
* Follow up to #4242: Restrict icon/label separator spacing to actionButton() * `yarn build` (GitHub Actions) * Add spacing only when both icon and label are truthy * Update snapshot * `yarn build` (GitHub Actions) * Slightly more readable JS * `yarn build` (GitHub Actions) --------- Co-authored-by: cpsievert <[email protected]>
1 parent f237de5 commit 3ea4c8e

File tree

9 files changed

+38
-31
lines changed

9 files changed

+38
-31
lines changed

R/input-action.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ get_action_children <- function(label, icon) {
9393
# minimize the chance of breaking existing code.
9494
tagList(
9595
icon,
96-
tags$span(class = "shiny-icon-separator"),
96+
tags$span(
97+
class = "shiny-icon-separator",
98+
class = if (length(label) > 0) "shiny-icon-spacer"
99+
),
97100
label
98101
)
99102
} else {

inst/www/shared/shiny.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/www/shared/shiny.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/www/shared/shiny.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)