Skip to content

Commit

Permalink
OEL-779: Add background toggle to navbar.
Browse files Browse the repository at this point in the history
  • Loading branch information
drishu committed Feb 3, 2022
1 parent a3a4f4d commit d3ada5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion templates/patterns/navbar/navbar.ui_patterns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ navbar:
color_scheme:
type: string
label: 'Color scheme'
description: 'The color scheme to use. Can be either light (dark text on light background) or dark (light text on dark background).'
description: 'The color scheme to use. Can be either light or dark.'
background:
type: boolean
label: 'Background'
description: 'Adds a background color that depends on the color scheme. Enabled by default.'
preview: true
branding:
type: render
label: 'Branding region'
Expand Down
4 changes: 3 additions & 1 deletion templates/patterns/navbar/pattern-navbar.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
{% extends '@oe-bcl/navbar' %}

{% set color_set = color_scheme|default('light') %}
{% set background = color_set %}
{% if background ?? true %}
{% set background = color_set %}
{% endif %}
{% set expand = expanded_breakpoint|default('lg') %}

{% block branding %}
Expand Down

0 comments on commit d3ada5b

Please sign in to comment.