π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
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
}