mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 03:26:51 +00:00
32 lines
762 B
TypeScript
32 lines
762 B
TypeScript
import { parseProp, stringifyProp } from 'nocodb-sdk'
|
|
|
|
export { parseProp, stringifyProp }
|
|
|
|
export const extractRowBackgroundColorStyle = (row: Row) => {
|
|
const result = {
|
|
rowBgColor: {},
|
|
rowLeftBorderColor: {},
|
|
rowBorderColor: {},
|
|
}
|
|
|
|
if (row.rowMeta?.rowBgColor) {
|
|
result.rowBgColor = {
|
|
backgroundColor: `${row.rowMeta?.rowBgColor} !important`,
|
|
|
|
...(row.rowMeta?.rowBorderColor
|
|
? { borderColor: `${row.rowMeta?.rowBorderColor} !important` }
|
|
: {
|
|
borderColor: `${themeV3Colors.gray[200]} !important`,
|
|
}),
|
|
}
|
|
}
|
|
|
|
if (row.rowMeta?.rowLeftBorderColor) {
|
|
result.rowLeftBorderColor = {
|
|
backgroundColor: `${row.rowMeta?.rowLeftBorderColor} !important`,
|
|
}
|
|
}
|
|
|
|
return result
|
|
}
|