<AirtableAsset />
component meant to display assets from Airtable.1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
map(airtableProducts, (airtableProduct) => {
const product: Product = airtableProduct.fields;
const image: Asset = product.images?.[0];
return (
<div key={image?.id}>
<AirtableAsset
id={product?.ref}
asset={image}
/>
</div>
);
})
}
// Generated example
<img
id="vista-al-valle-zapote-honey"
src="https://dl.airtable.com/OeNybctMTBKLPkbntK8p_jftonpzlxgakoxo9plfq.jpg"
title="jftonpzlxgakoxo9plfq.jpg"
alt="jftonpzlxgakoxo9plfq.jpg"
class="asset-vista-al-valle-zapote-honey"
/>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
map(airtableProducts, (airtableProduct) => {
const product: Product = airtableProduct;
const image: Asset = product.images?.[0];
return (
<AirtableAsset
asset={image}
transformationsOverride={{
width: 100
}}
/>
);
})
}
// Generated example
<img
id="asset-attlk6ONaDfaZbQTw"
src="https://dl.airtable.com/OeNybctMTBKLPkbntK8p_jftonpzlxgakoxo9plfq.jpg"
title="jftonpzlxgakoxo9plfq.jpg"
alt="jftonpzlxgakoxo9plfq.jpg"
class="asset-attlk6ONaDfaZbQTw"
style="width: 100px;"
/>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
map(airtableProducts, (airtableProduct) => {
const product: Product = airtableProduct;
const image: Asset = product.images?.[0];
return (
<div key={image?.id}>
<AirtableAsset
asset={{
...image,
...image?.thumbnails?.large,
}}
transformationsOverride={{
height: 75
}}
/>
</div>
);
})
}
small
thumbnail.1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
map(airtableProducts, (airtableProduct) => {
const product: Product = airtableProduct;
const image: Asset = product.images?.[0];
return (
<div key={image?.id}>
<AirtableAsset
asset={{
...image,
...image?.thumbnails?.small,
}}
/>
</div>
);
})
}
large
thumbnail.1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
map(airtableProducts, (airtableProduct) => {
const product: Product = airtableProduct;
const image: Asset = product.images?.[0];
return (
<AirtableAsset
asset={{
...image,
...image?.thumbnails?.large,
}}
/>
);
})
}