{"size": 358, "ext": "js", "max_stars_repo_path": "docs/_component/note.server.js", "max_stars_repo_name": "jbesomi/mdx", "max_stars_repo_stars_event_min_datetime": "2018-03-19T10:39:12.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T18:05:14.000Z", "max_issues_repo_path": "docs/_component/note.server.js", "max_issues_repo_name": "jbesomi/mdx", "max_issues_repo_issues_event_min_datetime": "2018-03-20T00:55:00.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T17:34:30.000Z", "max_forks_repo_path": "docs/_component/note.server.js", "max_forks_repo_name": "jbesomi/mdx", "max_forks_repo_forks_event_min_datetime": "2018-04-05T06:35:49.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-26T17:32:37.000Z"}
{"max_stars_count": 12705, "max_issues_count": 1616, "max_forks_count": 1451, "avg_line_length": 22.375, "max_line_length": 62, "alphanum_fraction": 0.625698324}
import React from 'react'

const known = new Set(['info', 'legacy', 'important'])

export const Note = (props) => {
  const {children, type} = props
  const className = ['note']

  if (known.has(type)) className.push(type)
  else {
    throw new Error('Unknown note type `' + type + '`')
  }

  return <div className={className.join(' ')}>{children}</div>
}
