Skip to content

Instantly share code, notes, and snippets.

View d3vlopes's full-sized avatar

Leandro Lopes d3vlopes

View GitHub Profile
@d3vlopes
d3vlopes / FeaturePartial.tsx
Last active June 6, 2025 17:48
Exemplo aplicando Partial pattern em React
import { FeatureModel } from '@/domain/models/Feature';
export const FeaturePartial = (feature: FeatureModel, index?: number) => {
return (
<div
key={feature.id}
className="rounded-lg p-0.5"
>
<div className="flex flex-col items-center">
<img src={feature.icon.src} alt={feature.icon.alt} />
{
"pages": [
{
"__typename": "Page",
"header": {
"__typename": "Header",
"logo": {
"__typename": "Asset",
"description": null,
"url": "https://media.graphassets.com/2rObY82rREidExKivdTB"
{
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
"organizeImports": {
"enabled": true
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},
@d3vlopes
d3vlopes / models.ts
Last active May 28, 2024 01:48
Interface vs Type
interface SectionModel {
id: string;
heading: string;
}
interface ImageModel {
src: string;
alt: string;
}
@d3vlopes
d3vlopes / formatPrice.ts
Created September 17, 2022 19:04
FormatPrice
export const formatPrice = (value: number) => {
return value.toLocaleString('pt-BR', { minimumFractionDigits: 2 })
}