app/components/primer/alpha/dialog.rb in primer_view_components-0.0.118 vs app/components/primer/alpha/dialog.rb in primer_view_components-0.0.119
- old
+ new
@@ -119,17 +119,17 @@
subtitle: nil,
size: DEFAULT_SIZE,
position: DEFAULT_POSITION,
position_narrow: DEFAULT_POSITION_NARROW,
visually_hide_title: false,
- id: "dialog-#{(36**3 + rand(36**4)).to_s(36)}",
+ id: self.class.generate_id,
**system_arguments
)
@system_arguments = deny_tag_argument(**system_arguments)
@system_arguments[:tag] = "modal-dialog"
@system_arguments[:role] = "dialog"
- @system_arguments[:id] = id.to_s
+ @system_arguments[:id] = id
@system_arguments[:aria] = { modal: true }
@system_arguments[:classes] = class_names(
"Overlay",
"Overlay-whenNarrow",
SIZE_MAPPINGS[fetch_or_fallback(SIZE_OPTIONS, size, DEFAULT_SIZE)],