Skip to content

Instantly share code, notes, and snippets.

@kalpeshsingh
Created June 26, 2021 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalpeshsingh/d79b5fd1b15b0367668e860ce7f3f06c to your computer and use it in GitHub Desktop.
Save kalpeshsingh/d79b5fd1b15b0367668e860ce7f3f06c to your computer and use it in GitHub Desktop.
documentation_examples

Functions (directly in the codebase)

/**
 * @description Renders a custom heading component for font and localization usage
 * Note- The style will take precedence over any custom style props to enable control to the consumer
 *
 * @param props {object} {children, color, fontStyle, ...rest} - some more description if required
 * @returns {JSX.Element}
 * @author Name Surname <youremail@company.com>
 */
 
 const foo = () => {
   // your code  
 };
 

Components (Team's internal documentation site)

<Tile />

<IMAGE_URL>

<Tile /> component will be used to display a date and day. User can select any date and we will load the listing of that specific date.

Prop Description Default Type Possible Values
date A string which will provide day and date. If the date matches with today then the day name will be 'Today'. today's date string in format of YYYMMDD Example - 20160708 string N/A
isSelected A prop to highlight the false bool true | false
isDisabled A prop to make the tile clickable false bool true | false
data A data that you want when click event happens - any any
onClick A callback function which will provide the date, data and isDisabled back to caller function. - function N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment