-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add a custom preset primevue theme Update custom primevue theme Update custom primevue theme change transitionDuration to 0.05s Fix padding diff between header and body cell * Add hover effect for checkbox --------- Co-authored-by: Matthew Evans <7916000+ml-evs@users.noreply.github.com>
- Loading branch information
1 parent
2f3dfb2
commit 83f52b7
Showing
3 changed files
with
93 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import Aura from "@primevue/themes/aura"; | ||
import { definePreset } from "@primevue/themes"; | ||
|
||
const DatalabPreset = definePreset(Aura, { | ||
semantic: { | ||
transitionDuration: "0.05s", | ||
}, | ||
components: { | ||
datatable: { | ||
extend: { | ||
filterActiveBackground: "{primary.50}", | ||
filterActiveColor: "{primary.700}", | ||
maxWidth: "1rem", | ||
whitespace: "nowrap", | ||
overflow: "hidden", | ||
textOverflow: "ellipsis", | ||
divCheckboxHover: "#6C757D", | ||
divCheckboxCheckedHover: "#5A6268", | ||
}, | ||
bodyCellPadding: "0.4rem", | ||
sortIconColor: "transparent", | ||
}, | ||
checkbox: { | ||
hoverBorderColor: "#6C757D", | ||
checkedBackground: "#6C757D", | ||
checkedBorderColor: "#6C757D", | ||
iconCheckedColor: "#F8F9FA", | ||
checkedHoverBackground: "#5A6268", | ||
checkedHoverBorderColor: "#5A6268", | ||
iconCheckedHoverColor: "#F8F9FA", | ||
}, | ||
button: { | ||
extend: { | ||
activeSVG: "{primary.700}", | ||
}, | ||
}, | ||
}, | ||
css: ({ dt }) => ` | ||
.p-datatable-thead tr th.filter-active { | ||
background: ${dt("datatable.filterActiveBackground")}; | ||
color: ${dt("datatable.filterActiveColor")} | ||
} | ||
th.filter-active .p-button-text.p-button-secondary { | ||
color: ${dt("datatable.activeSVG")}; | ||
} | ||
.p-datatable-tbody tr td { | ||
max-width: ${dt("datatable.maxWidth")}; | ||
white-space: ${dt("datatable.whitespace")}; | ||
overflow: ${dt("datatable.overflow")}; | ||
text-overflow: ${dt("datatable.textOverflow")}; | ||
} | ||
.checkbox:hover .p-checkbox-box { | ||
border-color: ${dt("datatable.divCheckboxHover")}; | ||
} | ||
.checkbox:hover .p-checkbox-checked .p-checkbox-box { | ||
border-color: ${dt("datatable.divCheckboxCheckedHover")}; | ||
background: ${dt("datatable.divCheckboxCheckedHover")}; | ||
} | ||
`, | ||
}); | ||
|
||
export default { | ||
preset: DatalabPreset, | ||
options: { | ||
darkModeSelector: "none", | ||
}, | ||
}; |