Functional Component Refactor: Figma, Framer, Gist (#4260)
This commit is contained in:
@@ -2,19 +2,12 @@ import * as React from "react";
|
||||
import Frame from "../components/Frame";
|
||||
import { EmbedProps as Props } from ".";
|
||||
|
||||
const URL_REGEX = new RegExp("^https://framer.cloud/(.*)$");
|
||||
|
||||
export default class Framer extends React.Component<Props> {
|
||||
static ENABLED = [URL_REGEX];
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Frame
|
||||
{...this.props}
|
||||
src={this.props.attrs.href}
|
||||
title="Framer Embed"
|
||||
border
|
||||
/>
|
||||
);
|
||||
}
|
||||
function Framer(props: Props) {
|
||||
return (
|
||||
<Frame {...props} src={props.attrs.href} title="Framer Embed" border />
|
||||
);
|
||||
}
|
||||
|
||||
Framer.ENABLED = [new RegExp("^https://framer.cloud/(.*)$")];
|
||||
|
||||
export default Framer;
|
||||
|
||||
Reference in New Issue
Block a user