UNPKG

@radix-ui/themes

Version:

[![Radix Themes Logo](https://radix-ui.com/social/themes.png)](https://radix-ui.com/themes)

3 lines (2 loc) 538 B
import*as r from"react";import a from"classnames";import{Slot as c}from"@radix-ui/react-slot";import{codePropDefs as f}from"./code.props.js";import{extractProps as i}from"../helpers/index.js";import{marginPropDefs as P}from"../props/index.js";const t=r.forwardRef((o,p)=>{const{asChild:s,className:m,color:e,...d}=i(o,f,P),n=o.variant==="ghost"?e||void 0:e;return r.createElement(s?c:"code",{"data-accent-color":n,...d,ref:p,className:a("rt-reset","rt-Code",m)})});t.displayName="Code";export{t as Code}; //# sourceMappingURL=code.js.map