Skip to content

Instantly share code, notes, and snippets.

View leonidas198's full-sized avatar

Enrique Chávez leonidas198

View GitHub Profile
@Klerith
Klerith / heroes.json
Created November 23, 2022 15:45
Heros - Data para probar Apis
[{
"id": "5d86371f1efebc31def272e2",
"about": "Ipsum duis incididunt ullamco tempor. Amet incididunt Lorem consequat labore culpa. Pariatur amet veniam reprehenderit sunt laborum excepteur. Labore eu ut ut Lorem labore aliqua quis ex elit nulla in incididunt commodo aliquip. Velit excepteur eiusmod Lorem esse officia. Irure aliquip Lorem fugiat voluptate dolor duis consectetur aliquip pariatur tempor reprehenderit deserunt.",
"picture": "https://www.sideshow.com/storage/product-images/903421/iron-man_marvel_gallery_5c4cced10da7f.jpg",
"squarePic": "https://dam.smashmexico.com.mx/wp-content/uploads/2018/06/27181227/ironman_portada2.jpg",
"name": "Iron Man"
},
{
"id": "5d86371f2343e37870b91ef1",
"about": "Mollit officia ad excepteur anim proident incididunt eiusmod mollit consectetur id sit velit. Laborum ut magna officia qui laboris eiusmod do culpa. Culpa dolor officia velit cillum culpa deserunt cupidatat cillum ipsum laborum.",
@Klerith
Klerith / vite-testing-config.md
Last active November 7, 2024 17:24
Vite + Jest + React Testing Library - Configuraciones a seguir

Instalación y configuracion de Jest + React Testing Library

En proyectos de React + Vite

  1. Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react 
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
  1. Opcional: Si usamos Fetch API en el proyecto:
@Klerith
Klerith / EventModal.js
Last active July 30, 2024 01:24
Contenido HTML del Modal
<h1> Nuevo evento </h1>
<hr />
<form className="container">
<div className="form-group mb-2">
<label>Fecha y hora inicio</label>
<input className="form-control" placeholder="Fecha inicio" />
</div>
<div className="form-group mb-2">
@Klerith
Klerith / modal.css
Created June 8, 2020 17:40
React Modal Styles
/* Modal */
.ReactModalPortal > div{
opacity: 0;
}
.ReactModalPortal .ReactModal__Overlay {
align-items: center;
display: flex;
justify-content: center;
transition: opacity .2s ease-in-out;
@Klerith
Klerith / calendar-messages-es.js
Last active July 14, 2024 00:16
Big-Calendar - mensajes en español
export const messages = {
allDay: 'Todo el día',
previous: '<',
next: '>',
today: 'Hoy',
month: 'Mes',
week: 'Semana',
day: 'Día',
agenda: 'Agenda',
date: 'Fecha',