Skip to content

Commit

Permalink
fix: disabled button if slider is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Saelmala committed Dec 16, 2024
1 parent 8d9c2e6 commit 43d40fb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/production-line/production-line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ const UserControlBtn = styled(ActionButton)`
background: rgba(50, 56, 59, 1);
border: 0.2rem solid #6d6d6d;
width: 100%;
&:disabled {
background: rgba(50, 56, 59, 0.5);
}
`;

const LongPressWrapper = styled.div`
Expand Down Expand Up @@ -506,7 +510,11 @@ export const ProductionLine = ({
/>
<FlexContainer>
<FlexButtonWrapper className="first">
<UserControlBtn type="button" onClick={() => muteOutput()}>
<UserControlBtn
type="button"
onClick={() => muteOutput()}
disabled={value === 0}
>
<ButtonIcon>
{isOutputMuted ? <SpeakerOff /> : <SpeakerOn />}
</ButtonIcon>
Expand Down

0 comments on commit 43d40fb

Please sign in to comment.