Custom hook that returns the container style based on the provided props.
This hook takes optional style properties and returns the appropriate container style. If the input is undefined or empty, it returns an empty object. If the input is an array, it merges the styles in the array. It also merges with any new styles provided.
Param: containerStyleProps
The initial style props for the container, which can be a single style object or an array of style objects.
Param: newStyles
Additional style props to be merged with the initial styles, which can be a single style object or an array of style objects.
Returns
The merged container style object.
Example
conststyle = useContainerStyle([{ padding:10 }], { margin:5 }); // style will be { padding: 10, margin: 5 }
conststyle = useContainerStyle({ padding:10 }); // style will be { padding: 10 }
conststyle = useContainerStyle(); // style will be {}
Custom hook that returns the container style based on the provided props.
This hook takes optional style properties and returns the appropriate container style. If the input is undefined or empty, it returns an empty object. If the input is an array, it merges the styles in the array. It also merges with any new styles provided.