/
NowPlaying.tsx
40 lines (37 loc) · 899 Bytes
/
NowPlaying.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from "react";
import Svg from './Svg';
import Text from "./Text";
export interface Props {
cover: string;
track: string;
artist: string;
}
export const None: React.FC = () => {
return (
<Svg
width="350"
height="200"
>
<Text family="mono" size="small">No tunes...</Text>
</Svg>
);
}
export const Player: React.FC<Props> = ({ track, artist }) => {
return (
<Svg width="500" height="200">
<div style={{ display: "flex", flexDirection: "column" }}>
<Text family="mono" weight="bold">
Now Playing
</Text>
<div style={{ display: "flex" }}>
<Text size="small">
{track}{' '}
</Text>
<Text size="small">
{artist}
</Text>
</div>
</div>
</Svg>
);
};