rio
rio copied to clipboard
`fill_mode="fit"` doesn't work when using ImageFills on Icons
Describe the bug
When applying ImageFill to an Icon, with fill_mode="fit"
, The image isn't positioned properly. Despite setting the (what look to be) correct values on the SVG fill, the image refuses to center itself.
Expected Behavior
Expected the image to be centered.
Steps to Reproduce
import rio
from pathlib import Path
class AppComponent(rio.Component):
def build(self) -> rio.Component:
return rio.Row(
rio.Icon(
"castle",
fill=rio.ImageFill(
image=Path(
"/sample.jpg"
),
),
)
)
app = rio.App(
build=AppComponent,
)
app.run_as_web_server(
port=8001,
)
Screenshots/Videos
No response
Operating System
Linux
What browsers are you seeing the problem on?
Firefox
Browser version
No response
What device are you using?
No response
Additional context
No response