Skip to content

Commit

Permalink
add dfe css styling
Browse files Browse the repository at this point in the history
  • Loading branch information
oadetayo committed Jan 17, 2025
1 parent 642788c commit 8378b28
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/dfe_reactable.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ dfe_reactable <- function(data, ...) {
resizable = TRUE,
fullWidth = TRUE,
defaultColDef = reactable::colDef(
headerClass = "bar-sort-header",
headerClass = "govuk-table__header",
html = TRUE,
na = "NA",
minWidth = 65,
align = "left"
align = "left",
class = "govuk-table__cell"
),
rowClass = "govuk-table__cell",
language = reactable::reactableLang(
searchPlaceholder = "Search table..."
),
Expand All @@ -67,6 +69,7 @@ dfe_reactable <- function(data, ...) {
borderRadius = "5px"
)
),
class = "gov-table",
...
)
}
51 changes: 51 additions & 0 deletions inst/www/css/reactable_wrapper.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.govuk-table {
font-family: GDS Transport, arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-weight: 400;
font-size: 1rem;
line-height: 1.25;
color: #0b0c0c;
width: 100%;
margin-bottom: 20px;
border-spacing: 0;
border-collapse: collapse
}

@media print {
.govuk-table {
font-family: sans-serif
}
}

@media (min-width:40.0625em) {
.govuk-table {
font-size: 1.1875rem;
line-height: 1.3157894737
}
}

@media print {
.govuk-table {
font-size: 14pt;
line-height: 1.15;
color: #000
}
}

@media (min-width:40.0625em) {
.govuk-table {
margin-bottom: 30px
}
}

.govuk-table__header {
font-weight: 700
}

.govuk-table__cell, .govuk-table__header {
padding: 10px 20px 10px 0;
border-bottom: 1px solid #b1b4b6;
text-align: left;
vertical-align: top
}

0 comments on commit 8378b28

Please sign in to comment.