Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Semantic UI React item image as link

I am using Item (Semantic UI React) and I would like to set the image as a link. But how do I reference the link URL?

<Item>
    <Item.Image src={this.props.fileUrl} size='tiny' as='a' />
    <Item.Content>
    </Item.Content>
</Item>

If I wrap Item.Image in a a-container, the padding gets messed up...

like image 765
user3142695 Avatar asked Apr 14 '17 13:04

user3142695


1 Answers

You're on right way, you need to use the SUIR's augmentation, all non Item.Image props will be by-passed:

<Item.Image
  as='a'
  href='http://example.com'
  src={this.props.fileUrl}
  size='tiny'
/>
like image 150
Oleksandr Fediashov Avatar answered Sep 18 '22 08:09

Oleksandr Fediashov