Image
The Image component can handle all images of the app. The component prevents the image from being reloaded if the src
does not change.
The context can be used for global src modification e.g.: thumbnails.
Props
Name | Type | Default | Description |
---|
Component | element type | 'div' | The component used for the root node. Either a string to use a HTML element or a component. |
width | integer | '100%' | Image element width attribute |
height | integer | 'auto' | Image element height attribute |
ImageIconComponent | element type | ImageIcon | The component used for the svg icon node if the src property is missing. Either a string to use a HTML element or a component. |
PaperComponent | element type | Paper | The component used for the parent of the icon node. Either a string to use a HTML element or a component. |
PaperComponentProps | object | {color:'paper1', size:'menu', ContentComponent: 'Modal'} | Passing props to the PaperComponent |
The ref
is forwarded to the root element.
Example
function getSrc({src}) {
return src+'/?1'
}