-
Notifications
You must be signed in to change notification settings - Fork 3
ImageField
Daniel Petutschnigg edited this page Sep 26, 2021
·
8 revisions
The ImageField is your Jaen-option for embedding images hosted on the ipfs.
import { fields } from "@snek-at/jaen-pages";
const Component = () => {
return (
<fields.ImageField
fieldName="component-img"
initValue={{
src: 'https://your.source',
alt: 'imagealt'
}}
/>
)
}
export default Component
Property | Type | Required | Description |
---|---|---|---|
fieldName | string | yes | The fieldName requires you to name your field. The name has to be unique on the page. It is advisable to use descriptive names. |
initValue | object | yes | The initValue requires you to set a default image. For this purpose you have an object with the keys src, alt and optionally title. {src: string, title: string, alt: string}
|