Optimize CMS Alignment: Implement a Simple Code OverrideOptimize CMS Alignment: Implement a Simple Code Override
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Steal this simple code override to align CMS content properly.
export function withStretchSelf(Component): ComponentType {
    return forwardRef(({ style = {}, ...rest }, ref) => {
        return (
            <Component
                ref={ref}
                {...{
                    style: { ...style, height: "auto", alignSelf: "stretch" },
                    ...rest,
                }}
            />
        )
    })
}
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started