Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app: Indicator when configuration examples are live
- Loading branch information
1 parent
86a7a9f
commit 8d43503
Showing
2 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as React from 'react'; | ||
import styled from '@emotion/styled'; | ||
import {Radio, ZapOff} from 'react-feather'; | ||
|
||
type Props = { | ||
active: boolean; | ||
}; | ||
|
||
const LiveHistoryIndicator = ({active}: Props) => ( | ||
<Container showingLiveHistory={active}> | ||
{active ? <Radio size="1.25rem" /> : <ZapOff size="1rem" />} | ||
{active | ||
? 'Using real-time metadata from your devices' | ||
: 'Showing demo metadata (Play a track to see live metadata)'} | ||
</Container> | ||
); | ||
|
||
const Container = styled('div')<{showingLiveHistory: boolean}>` | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
gap: 0.5rem; | ||
position: relative; | ||
top: -1rem; | ||
left: -1.75rem; | ||
height: 1.75rem; | ||
margin-bottom: 0.5rem; | ||
padding: 0 1rem; | ||
background: ${p => (p.showingLiveHistory ? '#ff838e' : '#4B97F8')}; | ||
color: #fff; | ||
font-size: 0.675rem; | ||
text-transform: uppercase; | ||
font-weight: 700; | ||
`; | ||
|
||
export default LiveHistoryIndicator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters