Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/components/bcl-modal/modal.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
- fullscreen_responsive (string) (default: '')
options: sm, md, lg, xl, xxl
- static_backdrop (boolean) (default: false)
- verticaly_centered (boolean) (default: false)
- vertically_centered (boolean) (default: false)
- verticaly_centered (boolean) (default: false) // deprecated typo
- scrollable (boolean) (default: false)
- header (block) (default: '')
- messages (block) (default: '')
Expand All @@ -29,7 +30,7 @@
{% set _id = id|default('modal-' ~ random(10000)) %}
{% set _fullscreen_responsive = fullscreen_responsive|default('') %}
{% set _static_backdrop = static_backdrop ?? false %}
{% set _verticaly_centered = verticaly_centered ?? false %}
{% set _vertically_centered = vertically_centered ?? verticaly_centered ?? false %}
Copy link
Collaborator

@donquixote donquixote Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fallback!
Will the spell checker still complain about this?
(or maybe this was about spell checker in oebt, not here)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also could we emit some kind of deprecation notice? (I guess not)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, we dont have anything that can throw deprecation warnings. :(

{% set _scrollable = scrollable ?? false %}
{% set _header = header|default('') %}
{% set _header_attributes = header_attributes ?: create_attribute() %}
Expand Down Expand Up @@ -63,7 +64,7 @@
<div class="modal-dialog
{{- _size ? ' modal-' ~ size -}}
{{- _fullscreen_responsive ? ' modal-fullscreen-' ~ _fullscreen_responsive ~ '-down' -}}
{{- _verticaly_centered ? ' modal-dialog-centered' -}}
{{- _vertically_centered ? ' modal-dialog-centered' -}}
{{- _scrollable ? ' modal-dialog-scrollable' -}}"
>
<div class="modal-content">
Expand Down
4 changes: 2 additions & 2 deletions src/components/bcl-modal/modal.story.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import modal from "@openeuropa/bcl-modal/modal.html.twig";
const getArgs = () => ({
size: "default",
static_backdrop: false,
verticaly_centered: false,
vertically_centered: false,
scrollable: false,
});

Expand Down Expand Up @@ -40,7 +40,7 @@ const getArgTypes = () => ({
category: "Style",
},
},
verticaly_centered: {
vertically_centered: {
name: "verticaly centered",
type: { name: "boolean" },
description: "Vertically center the modal",
Expand Down
2 changes: 1 addition & 1 deletion src/components/bcl-modal/modal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("OE - modal", () => {
expect.assertions(1);

return expect(
render({ ...demoData, verticaly_centered: true }),
render({ ...demoData, vertically_centered: true }),
).resolves.toMatchSnapshot();
});

Expand Down
Loading