Juguetear / juguetear-web

Web del proyecto de préstamo de juguetes adaptados, desarrollado desde el Taller de ayudas técnicas de APRILP.
https://juguetear-web.vercel.app/
GNU General Public License v3.0
62 stars 27 forks source link

[Feat] Crear componente Team Member #306

Closed nykka closed 1 year ago

nykka commented 1 year ago

¿Qué te gustaría agregar a este proyecto?

Estructura:

El componente tiene que ubicarse en la carpeta componentes dentro de una carpeta propia en donde se van a crear los archivos necesarios:

Comportamiento esperado:

El componente tiene que recibir las props necesarias para renderizar foto, nombre, apellido, rol, links de contacto (array). Para los links hay que utilizar el componente Link de nuestro design system.

Accesibilidad:

La imagen tiene que estar oculta para los lectores de pantalla.

Story:

Crear un archivo .story para Storybook https://storybook.js.org/docs/react/writing-stories/introduction

Test:

Crear un test para el componente https://storybook.js.org/docs/react/writing-tests/introduction

Preview

Desktop Mobile
Image Image

Links Figma

Código de conducta y licencia.

alexxuss1996 commented 1 year ago

Hello, can you assign me to this issue, please?

LPRegen commented 1 year ago

Yes @alexxuss1996

alexxuss1996 commented 1 year ago

Great, thanks! @LPRegen

alexxuss1996 commented 1 year ago

How links array and structure of data, in general, should look like? @LPRegen @TonyMckes

TonyMckes commented 1 year ago

How links array and structure of data, in general, should look like? @LPRegen @TonyMckes

@alexxuss1996 probably something like:

interface TeamMember {
  _id: string
  image: Image
  name: string
  surname: string
  pronouns: string
  role: string
  contactLinks: ContactLink[]
}

interface ContactLink {
  name: string  // or "label"
  url: string
}

interface Image {
  altText: string
  asset: AssetRef  // This can be pass to the function `urlFor`
}
alexxuss1996 commented 1 year ago

@TonyMckes can you make the asset ref (to pass in urlFor)? Need some mock data. Oh, and _id also...

TonyMckes commented 1 year ago

@TonyMckes can you make the asset ref (to pass in urlFor)? Need some mock data. Oh, and _id also...

Mhmm... @alexxuss1996 I think the image can be optional, so we may as well check if the image is actually there, and if not then render a placeholder (gray circle for now)