Skip to content

Commit

Permalink
regression: ResetButton misaligned on BooleanSettingInput (Rocket…
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris authored Dec 14, 2023
1 parent 8910208 commit f15577f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FieldLabel, FieldRow, ToggleSwitch } from '@rocket.chat/fuselage';
import { Box, FieldLabel, FieldRow, ToggleSwitch } from '@rocket.chat/fuselage';
import type { ReactElement, SyntheticEvent } from 'react';
import React from 'react';

Expand Down Expand Up @@ -34,8 +34,10 @@ function BooleanSettingInput({
<FieldLabel htmlFor={_id} title={_id}>
{label}
</FieldLabel>
<ToggleSwitch data-qa-setting-id={_id} id={_id} checked={value === true} disabled={disabled || readonly} onChange={handleChange} />
{hasResetButton && <ResetSettingButton mis={8} data-qa-reset-setting-id={_id} onClick={onResetButtonClick} />}
<Box display='flex' alignItems='center'>
{hasResetButton && <ResetSettingButton mie={8} data-qa-reset-setting-id={_id} onClick={onResetButtonClick} />}
<ToggleSwitch data-qa-setting-id={_id} id={_id} checked={value === true} disabled={disabled || readonly} onChange={handleChange} />
</Box>
</FieldRow>
);
}
Expand Down

0 comments on commit f15577f

Please sign in to comment.