mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00
TablePicker: Change table cells in picker (#1202)
- Fix error that the border of table cells was invisible in dark mode - Add margin to table cells - Add full border to table cells - Change border-color while hovering over table cells Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
9d8ce946e8
commit
bba2b207c4
2 changed files with 4 additions and 22 deletions
|
@ -11,33 +11,15 @@
|
||||||
@import "../../../../../style/variables.light";
|
@import "../../../../../style/variables.light";
|
||||||
|
|
||||||
.table-cell {
|
.table-cell {
|
||||||
border-top: 1px solid $dark;
|
border: 1px solid $gray-700;
|
||||||
border-left: 1px solid $dark;
|
margin: 1px;
|
||||||
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-container {
|
.table-container {
|
||||||
border-bottom: 1px solid $dark;
|
|
||||||
border-right: 1px solid $dark;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(10, 15px [col-start]);
|
grid-template-columns: repeat(10, 15px [col-start]);
|
||||||
grid-template-rows: repeat(8, 15px [row-start]);
|
grid-template-rows: repeat(8, 15px [row-start]);
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark {
|
|
||||||
@import "../../../../../style/variables.dark";
|
|
||||||
|
|
||||||
.table-cell {
|
|
||||||
border-top: 1px solid $dark;
|
|
||||||
border-left: 1px solid $dark;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-container {
|
|
||||||
border-bottom: 1px solid $dark;
|
|
||||||
border-right: 1px solid $dark;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(10, 15px [col-start]);
|
|
||||||
grid-template-rows: repeat(8, 15px [row-start]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ export const TablePicker: React.FC<TablePickerProps> = ({ show, onDismiss, onTab
|
||||||
.map((col: number) => (
|
.map((col: number) => (
|
||||||
<div
|
<div
|
||||||
key={ `${ row }_${ col }` }
|
key={ `${ row }_${ col }` }
|
||||||
className={ `table-cell ${ tableSize && row < tableSize.rows && col < tableSize.columns ? 'bg-primary' : '' }` }
|
className={ `table-cell ${ tableSize && row < tableSize.rows && col < tableSize.columns ? 'bg-primary border-primary' : '' }` }
|
||||||
onMouseEnter={ () => {
|
onMouseEnter={ () => {
|
||||||
setTableSize({
|
setTableSize({
|
||||||
rows: row + 1,
|
rows: row + 1,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue