|
3 | 3 |
|
4 | 4 | shadow = "rgba(0, 0, 0, 0.15) 0px 2px 8px" |
5 | 5 | chat_margin = "20%" |
6 | | -message_style = dict( |
7 | | - padding="1em", |
8 | | - border_radius="5px", |
9 | | - margin_y="0.5em", |
10 | | - box_shadow=shadow, |
11 | | - max_width="30em", |
12 | | - display="inline-block", |
13 | | -) |
| 6 | +message_style = { |
| 7 | + "padding": "1em", |
| 8 | + "border_radius": "5px", |
| 9 | + "margin_y": "0.5em", |
| 10 | + "box_shadow": shadow, |
| 11 | + "max_width": "30em", |
| 12 | + "display": "inline-block", |
| 13 | +} |
14 | 14 |
|
15 | 15 | # Set specific styles for questions and answers. |
16 | | -question_style = message_style | dict( |
17 | | - background_color=rx.color("gray", 4), margin_left=chat_margin |
18 | | -) |
19 | | -answer_style = message_style | dict( |
20 | | - background_color=rx.color("accent", 8), margin_right=chat_margin |
21 | | -) |
| 16 | +question_style = message_style | { |
| 17 | + "background_color": rx.color("gray", 4), |
| 18 | + "margin_left": chat_margin, |
| 19 | +} |
| 20 | +answer_style = message_style | { |
| 21 | + "background_color": rx.color("accent", 8), |
| 22 | + "margin_right": chat_margin, |
| 23 | +} |
22 | 24 |
|
23 | 25 | # Styles for the action bar. |
24 | | -input_style = dict(border_width="1px", box_shadow=shadow, width="350px") |
25 | | -button_style = dict(background_color=rx.color("accent", 10), box_shadow=shadow) |
| 26 | +input_style = {"border_width": "1px", "box_shadow": shadow, "width": "350px"} |
| 27 | +button_style = {"background_color": rx.color("accent", 10), "box_shadow": shadow} |
0 commit comments