accept dict for header styling (#5905)

I found that it's harder to style a header with the list using index,
they are to be applied by header name. Otherwise, we might end up using
a different header for coloring, or worse throw some error because the
header name and style don't match.
Row does have it's property of index, so it makes sense there.
This commit is contained in:
Saugat Pachhai
2021-04-30 18:43:38 +05:45
committed by GitHub
parent d509d77193
commit dba0aaeab7
4 changed files with 33 additions and 30 deletions
+1
View File
@@ -119,6 +119,7 @@ def test_rich_border(capsys: CaptureFixture[str]):
"extra_opts",
[
{"header_styles": [{"style": Style(bold=True)}]},
{"header_styles": {"first": {"style": Style(bold=True)}}},
{"row_styles": [{"style": Style(bold=True)}]},
],
)