[ABANDONDED] Set of "apps" for the Flexor social network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
472 B

5 years ago
5 years ago
5 years ago
5 years ago
  1. import React, { FC } from 'react'
  2. import { GiphyGif } from '../../../types'
  3. interface Props {
  4. gif: GiphyGif
  5. selected: boolean
  6. onSelect: (id: string) => void
  7. }
  8. const Gif: FC<Props> = ({ gif, selected, onSelect }) => {
  9. return (
  10. <div className="gif" style={{ borderColor: selected ? '#f00' : '#333' }} onClick={() => onSelect(gif.id)}>
  11. <img src={gif.images.fixed_height.url} alt={gif.title} />
  12. </div>
  13. )
  14. }
  15. export default Gif