Problem/Motivation
When we call a component story and we override some slots and/or props value:
type: component
component: 'ui_suite_bootstrap:button'
story: preview
slots:
label: Test
props:
variant: success
The override doesn't work
Proposed resolution
Reverse the merges:
- $slots = array_merge($element["#slots"] ?? [], $story["slots"] ?? []);
+ $slots = array_merge($story["slots"] ?? [], $element["#slots"] ?? []);
- $element["#props"] = array_merge($element["#props"] ?? [], $story["props"] ?? []);
+ $element["#props"] = array_merge($story["props"] ?? [], $element["#props"] ?? []);
Comments
Comment #2
pdureau commentedComment #5
pdureau commented