Type Alias ContainerStyle

ContainerStyle: ViewStyle | ViewStyle[]

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.

The initial style props for the container, which can be a single style object or an array of style objects.

Additional style props to be merged with the initial styles, which can be a single style object or an array of style objects.

The merged container style object.

const style = useContainerStyle([{ padding: 10 }], { margin: 5 });
// style will be { padding: 10, margin: 5 }

const style = useContainerStyle({ padding: 10 });
// style will be { padding: 10 }

const style = useContainerStyle();
// style will be {}