Skip to content

Commit

Permalink
fix: prop name changes after deps update
Browse files Browse the repository at this point in the history
  • Loading branch information
slavikdenis committed Jan 16, 2023
1 parent 893feed commit 52d3430
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions src/components/settings/SettingTimerField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type SettingTimerFieldProps = {
value: number;
onChange: (value: number) => void;
PopoverComponent: ReactNode;
disabled?: boolean;
isDisabled?: boolean;
minValue?: number;
maxValue?: number;
step?: number;
Expand All @@ -43,7 +43,7 @@ const SettingTimerField = ({
PopoverComponent,
value,
onChange,
disabled = false,
isDisabled = false,
step = 5,
minValue,
maxValue,
Expand Down Expand Up @@ -91,8 +91,8 @@ const SettingTimerField = ({
w="2rem"
h="1.75rem"
size="sm"
disabled={
disabled || (isNumber(minValue) && value - step < minValue)
isDisabled={
isDisabled || (isNumber(minValue) && value - step < minValue)
}
onClick={() => onChange(value - step)}
>
Expand All @@ -103,16 +103,16 @@ const SettingTimerField = ({
<NumberInputField
paddingX="3rem"
disabled
_disabled={disabled ? undefined : {}}
_disabled={isDisabled ? undefined : {}}
/>

<InputRightElement paddingRight="0.5rem">
<Button
w="2rem"
h="1.75rem"
size="sm"
disabled={
disabled || (isNumber(maxValue) && value + step > maxValue)
isDisabled={
isDisabled || (isNumber(maxValue) && value + step > maxValue)
}
onClick={() => onChange(value + step)}
>
Expand Down
6 changes: 3 additions & 3 deletions src/components/settings/SettingsContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const SettingsContent = ({
onChange={(v) => handleTimerChange('autoStopTime', v)}
minValue={Math.max(AUTO_STOP_MIN, waveTime)}
maxValue={AUTO_STOP_MAX}
disabled={!autoStopTimer}
isDisabled={!autoStopTimer}
PopoverComponent={<AutoStopTimerPopover />}
CheckboxComponent={
<Checkbox
Expand All @@ -125,7 +125,7 @@ const SettingsContent = ({
isChecked={screenWakeLock}
onChange={(v) => setSetting('screenWakeLock', v)}
PopoverComponent={<ScreenWakeLockPopover />}
disabled={!isSWLSupported}
isDisabled={!isSWLSupported}
/>

<SettingsSwitchField
Expand All @@ -134,7 +134,7 @@ const SettingsContent = ({
isChecked={vibrations}
onChange={(v) => setSetting('vibrations', v)}
PopoverComponent={<VibrationsPopover />}
disabled={!isVibSupported}
isDisabled={!isVibSupported}
/>
</Box>
</>
Expand Down
6 changes: 3 additions & 3 deletions src/components/settings/SettingsSwitchField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type SettingsSwitchFieldProps = {
isChecked: boolean;
onChange: (value: boolean) => void;
PopoverComponent: ReactNode;
disabled?: boolean;
isDisabled?: boolean;
};

const SettingsSwitchField = ({
Expand All @@ -31,7 +31,7 @@ const SettingsSwitchField = ({
PopoverComponent,
isChecked,
onChange,
disabled = false,
isDisabled = false,
}: SettingsSwitchFieldProps) => {
return (
<FormControl id={fieldId}>
Expand Down Expand Up @@ -62,7 +62,7 @@ const SettingsSwitchField = ({
isChecked={isChecked}
colorScheme="green"
size="lg"
disabled={disabled}
isDisabled={isDisabled}
/>
</Flex>
</FormControl>
Expand Down

1 comment on commit 52d3430

@vercel
Copy link

@vercel vercel bot commented on 52d3430 Jan 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vape-timer – ./

vape-timer-slavikdenis.vercel.app
vape-timer.vercel.app
vape-timer-git-main-slavikdenis.vercel.app

Please sign in to comment.