Utility classes not being passed over into navbar component

Created on 8 January 2024, 11 months ago
Updated 9 January 2024, 11 months ago

Problem/Motivation

Want to change the color theme etc for the navbar component.

Steps to reproduce

I copied over components/page and components/page-header from radix into my subtheme.
lines 16-18 of page.twig were changed to:

  {% block page_header %}
    {% include 'foobar:page-header' %}
  {% endblock %}

lines 8-12 of page-header.twig were changed to

{% embed 'radix:navbar' with {
  container: 'fixed',
  color: 'dark',
  navbar_utility_classes: ['bg-dark'],
} %}

I would expect those values to be passed into the navbar, but generated html source still has navbar-light and bg-light classes on it.

I donโ€™t see anything above page. html.twig doesnโ€™t have any radix.foo to override.

๐Ÿ› Bug report
Status

Closed: works as designed

Version

6.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States erutan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @erutan
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States amstercad

    Did you change your template file to match your theme changes?

    For example, if your template is mytheme > templates > node--article--card-common.html.twig

    ...has that file been edited from something like: {% embed 'radix:card' with {

    ...into {% embed 'radix:mytheme' with {

    Doing so is a critical step and I don't see that step written in your question.

  • Status changed to Closed: works as designed 11 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States erutan

    Ah yup that was it. Was focused on the component structure and forgot about invoking them in a template. :)

    Thanks, and noted in the docs issue I made a bit ago heh.

Production build 0.71.5 2024