Files
divkit/test_data/samples/base/border.json
T
2022-11-24 12:48:11 +03:00

125 lines
2.8 KiB
JSON

{
"templates": {
"title": {
"type": "text",
"font_size": 20,
"line_height": 24,
"font_weight": "bold",
"paddings": {
"left": 24,
"right": 24,
"bottom": 16
}
},
"subtitle": {
"font_size": 15,
"line_height": 20,
"type": "text",
"paddings": {
"left": 24,
"right": 24
}
},
"text_block": {
"type": "text",
"id": "visible_id",
"width": {
"type": "match_parent"
},
"height": {
"type": "fixed",
"value": 88
},
"border": {
"corner_radius": 16
},
"margins": {
"top": 8,
"right": 24,
"left": 24
},
"background": [
{
"type": "solid",
"color": "#0E000000"
}
],
"text_color": "#000000",
"font_size": 14,
"text_alignment_vertical": "center",
"text_alignment_horizontal": "center"
}
},
"card": {
"log_id": "sample_card",
"states": [
{
"state_id": 0,
"div": {
"type": "container",
"orientation": "vertical",
"margins": {
"top": 24,
"bottom": 24
},
"items": [
{
"type": "title",
"text": "Border"
},
{
"type": "subtitle",
"text": "Using a border, you can set the corner radius (round corners), outline, and shadows.",
"margins": {
"bottom": 24
}
},
{
"type": "container",
"orientation": "vertical",
"items": [
{
"type": "text_block",
"text": "Shadow",
"border": {
"has_shadow": 1
}
},
{
"type": "text_block",
"text": "Corner radius 16dp",
"border": {
"corner_radius": 16
}
},
{
"type": "text_block",
"text": "Stroke 8dp",
"border": {
"stroke": {
"color": "#3F28C3",
"width": 8
}
}
},
{
"type": "text_block",
"text": "Set",
"border": {
"stroke": {
"color": "#3F28C3",
"width": 8
},
"corner_radius": 16,
"has_shadow": 1
}
}
]
}
]
}
}
]
}
}