Is your feature request related to a problem? Please describe.
Currently modal properties supplied to components that allow opening and closing of a modal use the following props:
modalDescription
modalTitle
modalWidth
While this suffices, any additional properties will need to be added to each dependent component. It also means extra work is needed to make sure these props align across all dependent components.
Describe the solution you'd like
Specify a single object property called modalProps, e.g:
<SidebarHint modalProps={{
modalDescription: "More information will be made available as it is published.",
modalTitle: "More information",
}}>
<Tooltip modalProps={{
modalTitle: "Visitor Counts (BT Footfall)",
modalWidth: "xl",
}}>
It's easy to check for errors in specifying these objects using an interface or type exposed by the modal package (perhaps in a <script context="module"> tag):
Is your feature request related to a problem? Please describe.
Currently modal properties supplied to components that allow opening and closing of a modal use the following props:
modalDescription
modalTitle
modalWidth
While this suffices, any additional properties will need to be added to each dependent component. It also means extra work is needed to make sure these props align across all dependent components.
Describe the solution you'd like
Specify a single object property called
modalProps
, e.g:It's easy to check for errors in specifying these objects using an interface or type exposed by the modal package (perhaps in a
<script context="module">
tag):This pattern can be applied in other areas where multiple props are passed specifically and only to a single sub component.
Describe alternatives you've considered
None.
Additional context
None.