More improvements to form controls with bootstrap 5

This commit is contained in:
Alejandro Celaya
2022-03-05 19:57:48 +01:00
parent dee1932a64
commit d8e4a4b891
11 changed files with 84 additions and 78 deletions

View File

@@ -5,6 +5,7 @@ import ToggleSwitch from '../utils/ToggleSwitch';
import { DropdownBtn } from '../utils/DropdownBtn';
import { FormText } from '../utils/forms/FormText';
import { Settings, ShortUrlCreationSettings as ShortUrlsSettings, TagFilteringMode } from './reducers/settings';
import { LabeledFormGroup } from '../utils/forms/LabeledFormGroup';
interface ShortUrlCreationProps {
settings: Settings;
@@ -50,8 +51,7 @@ export const ShortUrlCreationSettings: FC<ShortUrlCreationProps> = ({ settings,
</FormText>
</ToggleSwitch>
</FormGroup>
<div>
<label className="form-label">Tag suggestions search mode:</label>
<LabeledFormGroup noMargin label="Tag suggestions search mode:">
<DropdownBtn text={tagFilteringModeText(shortUrlCreation.tagFilteringMode)}>
<DropdownItem
active={!shortUrlCreation.tagFilteringMode || shortUrlCreation.tagFilteringMode === 'startsWith'}
@@ -67,7 +67,7 @@ export const ShortUrlCreationSettings: FC<ShortUrlCreationProps> = ({ settings,
</DropdownItem>
</DropdownBtn>
<FormText>{tagFilteringModeHint(shortUrlCreation.tagFilteringMode)}</FormText>
</div>
</LabeledFormGroup>
</SimpleCard>
);
};