import * as React from "react"
import { Frame } from "framer"
import { url } from "framer/resource"
export function MyComponent() {
return (
<Frame image={url("./code/test.png")} size={"100%"} />
)
}
// GOOD: Use a relative path. Call url() within component. 这样是对的使用方式
const image = "./code/test.png"
export function MyComponent() {
return <Frame image={url(image)} size={"100%"} />
}
// BAD: Avoid this. The returned url may change over time. 这是错的使用方式
const image = url("./code/test.png")
export function MyComponent() {
return <Frame image={image} size={"100%"} />
}