Step by step navigation related links example

Always display as a list

when this component is rendered alongside an expanded step by step, we want it to render as a heading. However, in some cases the component will not be followed by a step by step, for example Book Driving Test. In these cases, the heading is not followed by any content, so it should be rendered as a list instead.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/step_by_step_nav_related", {
  pretitle: "Also part of",
  always_display_as_list: true,
  links: [
    {
      href: "/learn-to-drive-a-motorbike",
      text: "Learn to drive a motorbike: step by step"
    }
  ]
} %>