v0.4.5
Added support for <AspectRatio>
:
import { AspectRatio } from "@zaydek/sorcery/dist/runtime"
<AspectRatio aspectRatio={16 / 9} {...props}>
{children}
</AspectRatio>
This is equivalent to:
<div className="relative" style={{ paddingBottom: (1 / aspectRatio) * 100 + "%" }} {...props}>
<div className="absolute y-0 x-0">
{children}
</div>
</div>