From dee1932a64471f227814fb9e7f34ab057ad8a802 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 5 Mar 2022 19:43:10 +0100 Subject: [PATCH] Fixed form labels --- src/settings/RealTimeUpdatesSettings.tsx | 6 +++--- src/settings/ShortUrlCreationSettings.tsx | 6 +++--- src/settings/ShortUrlsListSettings.tsx | 15 ++++++--------- src/settings/TagsSettings.tsx | 8 ++++---- src/settings/VisitsSettings.tsx | 15 ++++++--------- src/short-urls/helpers/QrCodeModal.tsx | 11 ++++------- src/utils/forms/FormGroupContainer.tsx | 4 ++-- 7 files changed, 28 insertions(+), 37 deletions(-) diff --git a/src/settings/RealTimeUpdatesSettings.tsx b/src/settings/RealTimeUpdatesSettings.tsx index c9179036..8be3fced 100644 --- a/src/settings/RealTimeUpdatesSettings.tsx +++ b/src/settings/RealTimeUpdatesSettings.tsx @@ -25,8 +25,8 @@ const RealTimeUpdatesSettings = ( - - - - +
+ = ({ settings, {tagFilteringModeHint(shortUrlCreation.tagFilteringMode)} - +
); }; diff --git a/src/settings/ShortUrlsListSettings.tsx b/src/settings/ShortUrlsListSettings.tsx index 01ed2547..e7079e7f 100644 --- a/src/settings/ShortUrlsListSettings.tsx +++ b/src/settings/ShortUrlsListSettings.tsx @@ -1,5 +1,4 @@ import { FC } from 'react'; -import { FormGroup } from 'reactstrap'; import { OrderingDropdown } from '../utils/OrderingDropdown'; import { SHORT_URLS_ORDERABLE_FIELDS } from '../short-urls/data'; import { SimpleCard } from '../utils/SimpleCard'; @@ -14,13 +13,11 @@ export const ShortUrlsListSettings: FC = ( { settings: { shortUrlsList }, setShortUrlsListSettings }, ) => ( - - - setShortUrlsListSettings({ defaultOrdering: { field, dir } })} - /> - + + setShortUrlsListSettings({ defaultOrdering: { field, dir } })} + /> ); diff --git a/src/settings/TagsSettings.tsx b/src/settings/TagsSettings.tsx index 8575be07..ce6d9593 100644 --- a/src/settings/TagsSettings.tsx +++ b/src/settings/TagsSettings.tsx @@ -16,7 +16,7 @@ interface TagsProps { export const TagsSettings: FC = ({ settings: { tags }, setTagsSettings }) => ( - + capitalize(tagsMode)} @@ -24,13 +24,13 @@ export const TagsSettings: FC = ({ settings: { tags }, setTagsSetting /> Tags will be displayed as {tags?.defaultMode ?? 'cards'}. - - +
+ setTagsSettings({ ...tags, defaultOrdering: { field, dir } })} /> - +
); diff --git a/src/settings/VisitsSettings.tsx b/src/settings/VisitsSettings.tsx index 3bb58e88..0598cd16 100644 --- a/src/settings/VisitsSettings.tsx +++ b/src/settings/VisitsSettings.tsx @@ -1,4 +1,3 @@ -import { FormGroup } from 'reactstrap'; import { FC } from 'react'; import { SimpleCard } from '../utils/SimpleCard'; import { DateIntervalSelector } from '../utils/dates/DateIntervalSelector'; @@ -11,13 +10,11 @@ interface VisitsProps { export const VisitsSettings: FC = ({ settings, setVisitsSettings }) => ( - - - setVisitsSettings({ defaultInterval })} - /> - + + setVisitsSettings({ defaultInterval })} + /> ); diff --git a/src/short-urls/helpers/QrCodeModal.tsx b/src/short-urls/helpers/QrCodeModal.tsx index eef90c65..295f6778 100644 --- a/src/short-urls/helpers/QrCodeModal.tsx +++ b/src/short-urls/helpers/QrCodeModal.tsx @@ -3,7 +3,6 @@ import { Modal, FormGroup, ModalBody, ModalHeader, Row, Button } from 'reactstra import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faFileDownload as downloadIcon } from '@fortawesome/free-solid-svg-icons'; import { ExternalLink } from 'react-external-link'; -import classNames from 'classnames'; import { ShortUrlModalProps } from '../data'; import { SelectedServer } from '../../servers/data'; import { CopyToClipboardIcon } from '../../utils/CopyToClipboardIcon'; @@ -56,10 +55,8 @@ const QrCodeModal = (imageDownloader: ImageDownloader, ForServerVersion: FC - - + + {capabilities.marginIsSupported && ( - - + + = ( - { children, value, onChange, id, type, required, placeholder, className, labelClassName }, + { children, value, onChange, id, type, required, placeholder, className, labelClassName = '' }, ) => { const forId = useRef(id ?? uuid()); return ( - {children && } +