Add vignettes
diff --git a/R/htmlTable_styling.R b/R/htmlTable_styling.R
index da43ab1..9afd9ca 100644
--- a/R/htmlTable_styling.R
+++ b/R/htmlTable_styling.R
@@ -3,12 +3,22 @@
#' @description This function provides a set of shortcuts to common HTML table
#' formats
#'
-#' @param bootstrap_options Common HTML table formats
-#' @param font_size
+#' @param bootstrap_options A character vector for bootstrap table options. For
+#' detailed information, please check the package vignette or visit the
+#' w3schools' [Bootstrap Page](https://www.w3schools.com/bootstrap/bootstrap_tables.asp)
+#' . Possible options include "bs-table", "striped", "bordered", "hover",
+#' "condensed" and "responsive".
+#' @param full_width A `TRUE` of `FALSE` variable controlling whether the HTML
+#' table should have 100\% width.
+#' @param float A character string determining whether and how the HTML table
+#' should float on the page.
+#' @param font_size A numeric input for table font size
#'
#' @export
htmlTable_styling <- function(bootstrap_options = "bs-table",
- font_size = NULL, full_width = T) {
+ full_width = T,
+ float = c("left", "center", "right"),
+ font_size = NULL) {
bootstrap_options <- match.arg(
bootstrap_options,
c("bs-table", "striped", "bordered", "hover", "condensed", "responsive"),
@@ -33,6 +43,16 @@
if (!full_width) {
table_attr_style <- c(table_attr_style, "width: auto !important;")
}
+
+ float <- match.arg(float)
+ if (float == "center") {
+ table_attr_style <- c(table_attr_style,
+ "margin-left:auto; margin-right:auto;")
+ }
+ if (float == "right") {
+ table_attr_style <- c(table_attr_style,
+ "float: right;")
+ }
if (length(table_attr_style) != 0) {
table_attr_style <- paste0("style = '",
paste0(table_attr_style, collapse = " "), "'")