fix: Spotify embed shows white background in dark mode
This commit is contained in:
@@ -56,6 +56,7 @@ class Frame extends React.Component<PropsWithRef> {
|
||||
canonicalUrl,
|
||||
isSelected,
|
||||
referrerPolicy,
|
||||
className = "",
|
||||
src,
|
||||
} = this.props;
|
||||
const withBar = !!(icon || canonicalUrl);
|
||||
@@ -66,7 +67,9 @@ class Frame extends React.Component<PropsWithRef> {
|
||||
height={height}
|
||||
$withBar={withBar}
|
||||
$border={border}
|
||||
className={isSelected ? "ProseMirror-selectednode" : ""}
|
||||
className={
|
||||
isSelected ? `ProseMirror-selectednode ${className}` : className
|
||||
}
|
||||
>
|
||||
{this.isLoaded && (
|
||||
<Iframe
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as React from "react";
|
||||
import styled from "styled-components";
|
||||
import Frame from "../components/Frame";
|
||||
import { EmbedProps as Props } from ".";
|
||||
|
||||
@@ -23,7 +24,7 @@ function Spotify(props: Props) {
|
||||
}
|
||||
|
||||
return (
|
||||
<Frame
|
||||
<SpotifyFrame
|
||||
{...props}
|
||||
width="100%"
|
||||
height={`${height}px`}
|
||||
@@ -34,6 +35,10 @@ function Spotify(props: Props) {
|
||||
);
|
||||
}
|
||||
|
||||
const SpotifyFrame = styled(Frame)`
|
||||
border-radius: 13px;
|
||||
`;
|
||||
|
||||
Spotify.ENABLED = [new RegExp("https?://open\\.spotify\\.com/(.*)$")];
|
||||
|
||||
export default Spotify;
|
||||
|
||||
Reference in New Issue
Block a user