From 59a9a2fac4a9b8ce43d86e645c1782395b60a63f Mon Sep 17 00:00:00 2001 From: Ariful Alam Date: Sat, 26 Mar 2022 18:09:04 +0600 Subject: [PATCH] Add type definitions for social link --- types/index.d.ts | 71 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 5af211b..cbdd4ac 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -4,7 +4,7 @@ import { Component } from 'react'; -interface github { +interface Github { /** * GitHub org/user name */ @@ -13,17 +13,17 @@ interface github { /** * stars | updated */ - sortBy: string; + sortBy?: string; /** * How many projects to display */ - limit: number; + limit?: number; /** * Exclude projects option */ - exclude: { + exclude?: { /** * Forked projects will not be displayed if set to true */ @@ -38,18 +38,75 @@ interface github { }; } -interface config { +interface Social { + /** + * LinkedIn + */ + linkedin?: string; + + /** + * Twitter + */ + twitter?: string; + + /** + * Facebook + */ + facebook?: string; + + /** + * Dribbble + */ + dribbble?: string; + + /** + * Behance + */ + behance?: string; + + /** + * Medium + */ + medium?: string; + + /** + * dev.to + */ + devto?: string; + + /** + * Website + */ + website?: string; + + /** + * Phone + */ + phone?: string; + + /** + * Email + */ + email?: string; +} + +interface Config { /** * GitHub Config */ - github: github; + github: Github; + + /** + * Social links + */ + social?: Social; } interface GitProfileProps { /** * Config values */ - config: config; + config: Config; } declare class GitProfile extends Component {}