Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 1515 | Autoría | Ultima modificación | Ver Log |

import React from 'react'
import { Box, styled } from '@mui/material'

const Option = styled(Box)(({ theme }) => ({
  borderRadius: '50%',
  cursor: 'pointer',
  padding: 5,
  h4: {
    display: 'none'
  },
  '&:hover': {
    backgroundColor: 'whitesmoke'
  },
  [theme.breakpoints.up('md')]: {
    alignItems: 'center',
    borderRadius: theme.shape.borderRadius,
    display: 'inline-flex',
    gap: 1,
    flex: 1,
    h4: {
      display: 'initial'
    }
  }
}))

const ShareOption = ({
  title = '',
  icon: Icon = null,
  color = '#000',
  onClick = function () {}
}) => {
  return (
    <Option onClick={onClick}>
      {Icon && <Icon style={{ color }} />}
      <h4>{title}</h4>
    </Option>
  )
}

export default ShareOption