import React from 'react';
import { Code as CodePrimitive, CodeProps as CodePropsPrimitive } from '@modulz/primitives';

export type CodeProps = CodePropsPrimitive

type ExtractRefType<TypesThatMayContainReactRef> = TypesThatMayContainReactRef extends {ref?: React.Ref<infer T>} ? T : any;
type PrimitiveRefType = ExtractRefType<CodePropsPrimitive>  

export const Code = React.forwardRef<PrimitiveRefType, CodeProps>((props, ref) => {
  return (
    <CodePrimitive {...props} ref={ref}  styleConfig={{"base":{"code":{"normal":{"paddingBottom":"4px","paddingRight":"8px","fontSize":"10px","borderBottomRightRadius":"4px","borderBottomLeftRadius":"4px","paddingTop":"4px","borderTopLeftRadius":"4px","paddingLeft":"8px","backgroundColor":"rgba(252, 252, 253, 1)","borderTopRightRadius":"4px","color":"rgba(0, 0, 0, 1)","fontFamily":"SF Mono, Consolas, Liberation Mono, Menlo, monospace"}}},"variants":{}}}/>
  );
});


