mirror of
https://github.com/streamwall/streamwall.git
synced 2026-04-03 20:32:08 -04:00
Combine Button/ToggleButton components
This commit is contained in:
@@ -520,13 +520,13 @@ function StreamDelayBox({ delayState, setStreamCensored }) {
|
|||||||
{delayState.isConnected && (
|
{delayState.isConnected && (
|
||||||
<>
|
<>
|
||||||
<span>delay: {delayState.delaySeconds}s</span>
|
<span>delay: {delayState.delaySeconds}s</span>
|
||||||
<StyledToggleButton
|
<StyledButton
|
||||||
isActive={delayState.isCensored}
|
isActive={delayState.isCensored}
|
||||||
onClick={handleToggleStreamCensored}
|
onClick={handleToggleStreamCensored}
|
||||||
tabIndex={1}
|
tabIndex={1}
|
||||||
>
|
>
|
||||||
{buttonText}
|
{buttonText}
|
||||||
</StyledToggleButton>
|
</StyledButton>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</StyledStreamDelayBox>
|
</StyledStreamDelayBox>
|
||||||
@@ -662,20 +662,20 @@ function GridInput({
|
|||||||
</StyledGridButtons>
|
</StyledGridButtons>
|
||||||
)}
|
)}
|
||||||
<StyledGridButtons side="right">
|
<StyledGridButtons side="right">
|
||||||
<StyledToggleButton
|
<StyledButton
|
||||||
isActive={isBlurred}
|
isActive={isBlurred}
|
||||||
onClick={handleBlurClick}
|
onClick={handleBlurClick}
|
||||||
tabIndex={1}
|
tabIndex={1}
|
||||||
>
|
>
|
||||||
<NoVideoIcon />
|
<NoVideoIcon />
|
||||||
</StyledToggleButton>
|
</StyledButton>
|
||||||
<StyledToggleButton
|
<StyledButton
|
||||||
isActive={isListening}
|
isActive={isListening}
|
||||||
onClick={handleListeningClick}
|
onClick={handleListeningClick}
|
||||||
tabIndex={1}
|
tabIndex={1}
|
||||||
>
|
>
|
||||||
<SoundIcon />
|
<SoundIcon />
|
||||||
</StyledToggleButton>
|
</StyledButton>
|
||||||
</StyledGridButtons>
|
</StyledGridButtons>
|
||||||
<StyledGridInput
|
<StyledGridInput
|
||||||
value={editingValue || spaceValue || ''}
|
value={editingValue || spaceValue || ''}
|
||||||
@@ -760,6 +760,13 @@ const StyledButton = styled.button`
|
|||||||
background: #ccc;
|
background: #ccc;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
||||||
|
${({ isActive }) =>
|
||||||
|
isActive &&
|
||||||
|
`
|
||||||
|
border-color: red;
|
||||||
|
background: #c77;
|
||||||
|
`};
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
box-shadow: 0 0 10px orange inset;
|
box-shadow: 0 0 10px orange inset;
|
||||||
@@ -778,15 +785,6 @@ const StyledSmallButton = styled(StyledButton)`
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const StyledToggleButton = styled(StyledButton)`
|
|
||||||
${({ isActive }) =>
|
|
||||||
isActive &&
|
|
||||||
`
|
|
||||||
border-color: red;
|
|
||||||
background: #c77;
|
|
||||||
`};
|
|
||||||
`
|
|
||||||
|
|
||||||
const StyledGridContainer = styled.div`
|
const StyledGridContainer = styled.div`
|
||||||
position: relative;
|
position: relative;
|
||||||
`
|
`
|
||||||
|
|||||||
Reference in New Issue
Block a user