Files
webstudio/packages/react-sdk/src/components/code.tsx
T
Oleg Isonen fe82cd441e Separator component (#1099)
## Description


## Steps for reproduction

1. Add separator 
2. Paste `---` for markdown

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-02-22 13:11:35 +01:00

19 lines
358 B
TypeScript

import {
forwardRef,
createElement,
type ElementRef,
type ComponentProps,
} from "react";
const defaultTag = "code";
type Props = ComponentProps<typeof defaultTag>;
export const Code = forwardRef<ElementRef<typeof defaultTag>, Props>(
(props, ref) => {
return createElement(defaultTag, { ...props, ref });
}
);
Code.displayName = "Code";