diff --git a/releases.yml b/releases.yml index 9d11310b5..49206642e 100644 --- a/releases.yml +++ b/releases.yml @@ -4,6 +4,10 @@ url: /docs/base/tables#sortable-updated status: Updated notes: We've added the table sort button, which enables keyboard-accessible table sorting. + - component: Tiered list + url: /docs/patterns/tiered-list + status: Updated + notes: Added a new padding parameter to customize the bottom padding. - version: 4.40.0 features: - component: Logo section diff --git a/templates/_macros/vf_tiered-list.jinja b/templates/_macros/vf_tiered-list.jinja index 869aebe3c..026341bf2 100644 --- a/templates/_macros/vf_tiered-list.jinja +++ b/templates/_macros/vf_tiered-list.jinja @@ -3,6 +3,7 @@ # desktop vs. 50/50 split between title/description # is_list_full_width_on_tablet: whether list title/description each have their # own row on tablet vs. 50/50 split between title/description +# padding: Type of padding to apply. Options are "deep", "shallow", "default". Default is "default". # Slots # title: top-level title element # description: top-level description element @@ -10,6 +11,7 @@ # list_item_description_[1-25]: description element of each child list item # cta: CTA block element {% macro vf_tiered_list( + padding="default", is_description_full_width_on_desktop=true, is_list_full_width_on_tablet=true) -%} {%- set title_content = caller('title') -%} @@ -17,8 +19,17 @@ {%- set has_description = description_content|trim|length > 0 -%} {%- set cta_content = caller('cta') -%} {%- set has_cta = cta_content|trim|length > 0 -%} + {%- set padding = padding | trim -%} + {%- if padding not in ["deep", "shallow", "default"] -%} + {%- set padding = "default" -%} + {%- endif -%} + {%- if padding == "default" -%} + {%- set padding_classes = "p-section" -%} + {%- else -%} + {%- set padding_classes = "p-section--" + padding -%} + {%- endif -%} -
+

{% if has_description == true -%} diff --git a/templates/docs/patterns/tiered-list/index.md b/templates/docs/patterns/tiered-list/index.md index 26792c6e0..946dd6616 100644 --- a/templates/docs/patterns/tiered-list/index.md +++ b/templates/docs/patterns/tiered-list/index.md @@ -155,6 +155,26 @@ The `vf_tiered_list` Jinja macro can be used to generate a tiered list pattern. Whether the list element should be full-width on tablet + + + padding + + + No + + + One of:
+ 'deep',
+ 'shallow',
+ 'default' + + + 'default' + + + Padding variant for the section + +