commit ebe2fe07d1a9110a99a21772b79f189dd13b4ca8
Author: Tom Moor <tom.moor@gmail.com>
Date: Thu Aug 26 20:18:52 2021 -0700
fix: regex, formatting
commit 1fd17b6f8a72191ecbe593d221e467559b01c70f
Author: Matheus Breguêz <matbrgz@gmail.com>
Date: Thu Aug 26 09:37:12 2021 -0300
fix: change image size
commit 30e9bad0f5f486c876e7bf49bc726789daf1e1bc
Merge: ef99201c cc9468e2
Author: Matheus Breguêz <matbrgz@mail.com>
Date: Thu Aug 26 09:28:34 2021 -0300
Merge branch 'main' into feat/google-calendar-embed
commit ef99201c9d9728a1ecefa77eb36ab7845bbf69b5
Author: Matheus Breguêz <matbrgz@mail.com>
Date: Fri Jul 9 11:53:56 2021 -0300
Update GoogleCalendar.js
commit 0e910847566acd0f0dcb833822be6795f166eb1f
Merge: e98f94c0 ec5c47e0
Author: Matheus Breguêz <matbrgz@gmail.com>
Date: Wed Jul 7 14:49:06 2021 -0300
Merge remote-tracking branch 'origin/feat/google-calendar-embed' into feat/google-calendar-embed
commit e98f94c02d4d15f600a749d489a3277723767e74
Author: Matheus Breguêz <matbrgz@gmail.com>
Date: Wed Jul 7 14:29:49 2021 -0300
feat: Add Google Calendar Embed
commit ec5c47e0c8d84e9a463e8196169ebd36beddfa7b
Author: Matheus Breguêz <matbrgz@gmail.com>
Date: Wed Jul 7 14:29:49 2021 -0300
feat: Add Google Calendar Embed
30 lines
527 B
JavaScript
30 lines
527 B
JavaScript
// @flow
|
|
import * as React from "react";
|
|
import Frame from "./components/Frame";
|
|
|
|
const URL_REGEX = new RegExp(
|
|
"^https?://calendar.google.com/calendar/embed\\?src=(.*)$"
|
|
);
|
|
|
|
type Props = {|
|
|
attrs: {|
|
|
href: string,
|
|
matches: string[],
|
|
|},
|
|
|};
|
|
|
|
export default class GoogleCalendar extends React.Component<Props> {
|
|
static ENABLED = [URL_REGEX];
|
|
|
|
render() {
|
|
return (
|
|
<Frame
|
|
{...this.props}
|
|
src={this.props.attrs.href}
|
|
title="Google Calendar"
|
|
border
|
|
/>
|
|
);
|
|
}
|
|
}
|