{"size": 1407, "ext": "js", "max_stars_repo_path": "utils/create-component/templates/react/readme.js", "max_stars_repo_name": "ckaptan/canvas-kit", "max_stars_repo_stars_event_min_datetime": "2019-07-02T18:26:17.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-24T21:22:36.000Z", "max_issues_repo_path": "utils/create-component/templates/react/readme.js", "max_issues_repo_name": "ckaptan/canvas-kit", "max_issues_repo_issues_event_min_datetime": "2019-07-03T17:42:02.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T23:28:33.000Z", "max_forks_repo_path": "utils/create-component/templates/react/readme.js", "max_forks_repo_name": "NicholasBoll/canvas-kit", "max_forks_repo_forks_event_min_datetime": "2019-07-02T22:12:37.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-22T00:43:25.000Z"}
{"max_stars_count": 217, "max_issues_count": 1299, "max_forks_count": 153, "avg_line_length": 23.8474576271, "max_line_length": 92, "alphanum_fraction": 0.6801705757}
const getPascalCaseName = require('../../nameUtils').getPascalCaseName;
const getTitleCaseName = require('../../nameUtils').getTitleCaseName;

module.exports = (name, description, prerelease) => {
  const pascalCaseName = getPascalCaseName(name);
  const titleCaseName = getTitleCaseName(name);

  let prereleaseMsg = '';

  if (prerelease === 'labs') {
    prereleaseMsg = `
<a href="https://github.com/Workday/canvas-kit/tree/master/modules/labs-react/README.md">
  <img src="https://img.shields.io/badge/LABS-alpha-orange" alt="LABS: Alpha" />
</a>  This component is work in progress and currently in prerelease.
`;
  } else if (prerelease === 'preview') {
    prereleaseMsg = `
<a href="https://github.com/Workday/canvas-kit/tree/master/modules/preview-react/README.md">
  <img src="https://img.shields.io/badge/PREVIEW-beta-blueviolet" alt="PREVIEW: Beta" />
</a>  This component is work in progress and currently in prerelease.
`;
  }

  return `# Canvas Kit ${titleCaseName}
${prereleaseMsg}
${description}

## Installation

\`\`\`sh
yarn add @workday/canvas-kit-${prerelease && prerelease + '-'}react
\`\`\`

## Usage

\`\`\`tsx
import * as React from 'react';
import {${pascalCaseName}} from '@workday/canvas-kit-${prerelease &&
    prerelease + '-'}react/${name}';

<${pascalCaseName} />;
\`\`\`

## Static Properties

> None

## Component Props

### Required

> None

### Optional

> None
`;
};
