Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1198 from interval/table-cell-bgcolor
Browse files Browse the repository at this point in the history
Support highlight colors on table cells
  • Loading branch information
jacobmischka authored Apr 24, 2023
2 parents 85b2d0d + 0e6db3b commit 5555897
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/demos/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ async def table_test(io: IO):
"url": f"https://avatars.dicebear.com/api/pixel-art/{row['b']}.svg?scale=96&translateY=10",
"size": "small",
},
"highlightColor": "red",
},
},
"c",
Expand Down
6 changes: 6 additions & 0 deletions src/interval_sdk/io_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ class ActionResult(BaseModel):
"PassthroughSearchResultValue", bound=SearchResultValue
)

HighlightColor: TypeAlias = Literal[
"red", "orange", "yellow", "green", "blue", "purple", "pink", "gray"
]


class TableRowValueObject(TypedDict):
label: NotRequired[TableRowValuePrimitive]
Expand All @@ -355,6 +359,7 @@ class TableRowValueObject(TypedDict):
route: NotRequired[str]
params: NotRequired[SerializableRecord]
image: NotRequired[ImageDefinition]
highlightColor: NotRequired[HighlightColor]


class TableRowValueObjectModel(BaseModel):
Expand All @@ -364,6 +369,7 @@ class TableRowValueObjectModel(BaseModel):
route: Optional[str] = None
params: Optional[SerializableRecordModel] = None
image: Optional[ImageDefinitionModel] = None
highlightColor: Optional[HighlightColor] = None


TableRowValue: TypeAlias = Union[TableRowValueObject, TableRowValuePrimitive]
Expand Down

0 comments on commit 5555897

Please sign in to comment.