INNER CODE UNIT · TypeScript

attr

react/react-native-website · plugins/remark-snackplayer/src/index.ts:24

function attr(name: string, value: string) {
  return {
    type: 'mdxJsxAttribute',
    name,
    value,
  };
}

async function toJsxNode(node: Code) {
  const params = parseParams(node.meta ?? undefined);

  // Gather necessary Params
  const name = params.name ? decodeURIComponent(params.name) : 'Example';
  const description = params.description
    ? decodeURIComponent(params.description)
    : 'Example usage';
  const ext = params.ext ? decodeURIComponent(params.ext) : 'tsx';
  const filename = `App.${ext}`;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…