import React from 'react';
import * as rawComponents from './typography/DocumentFormatting';

export * from './typography/DocumentFormatting';

export const components = Object.entries(rawComponents).reduce(
  (acc, [k, V]) => ({
    ...acc,
    [k.toLowerCase()]: (props: object) => <V {...props} className={`sbdocs-${k.toLowerCase()}`} />,
  }),
  {}
);

import React from 'react';
import * as rawComponents from './typography/DocumentFormatting';

export * from './typography/DocumentFormatting';

export const components = Object.entries(rawComponents).reduce(
  (acc, [k, V]) => ({
    ...acc,
    [k.toLowerCase()]: (props: object) => (
      <V {...props} className={`sbdocs sbdocs-${k.toLowerCase()}`} />
    ),
  }),
  {}
);

Add idiomatic sbdocs classname to all docs components
Add idiomatic sbdocs classname to all docs components
