Skip to content

v0.4.5

Compare
Choose a tag to compare
@zaydek zaydek released this 03 Nov 17:25
· 730 commits to main since this release

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>