From 2a85b93c589b33738d31dcdf124fba6b3e809e06 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 11 Feb 2021 15:35:27 -0500 Subject: [PATCH] Adding an icon component. Fixes #172 --- src/shared/components/admin-settings.tsx | 9 +- src/shared/components/cake-day.tsx | 5 +- src/shared/components/comment-form.tsx | 5 +- src/shared/components/comment-node.tsx | 71 +++------ src/shared/components/communities.tsx | 7 +- src/shared/components/community-form.tsx | 13 +- src/shared/components/community.tsx | 17 +- src/shared/components/create-community.tsx | 5 +- src/shared/components/create-post.tsx | 5 +- .../components/create-private-message.tsx | 5 +- src/shared/components/icon.tsx | 31 ++++ src/shared/components/iframely-card.tsx | 5 +- src/shared/components/image-upload-form.tsx | 5 +- src/shared/components/inbox.tsx | 9 +- src/shared/components/login.tsx | 29 +--- src/shared/components/main.tsx | 21 +-- src/shared/components/markdown-textarea.tsx | 61 ++------ src/shared/components/modlog.tsx | 7 +- src/shared/components/moment-time.tsx | 5 +- src/shared/components/navbar.tsx | 25 +-- src/shared/components/password_change.tsx | 5 +- src/shared/components/post-form.tsx | 15 +- src/shared/components/post-listing.tsx | 148 ++++++------------ src/shared/components/post.tsx | 5 +- .../components/private-message-form.tsx | 9 +- src/shared/components/private-message.tsx | 44 ++---- src/shared/components/search.tsx | 9 +- src/shared/components/setup.tsx | 9 +- src/shared/components/sidebar.tsx | 18 +-- src/shared/components/site-form.tsx | 5 +- src/shared/components/sort-select.tsx | 13 +- src/shared/components/user.tsx | 21 +-- 32 files changed, 232 insertions(+), 409 deletions(-) create mode 100644 src/shared/components/icon.tsx diff --git a/src/shared/components/admin-settings.tsx b/src/shared/components/admin-settings.tsx index 6b985a43..596c83cd 100644 --- a/src/shared/components/admin-settings.tsx +++ b/src/shared/components/admin-settings.tsx @@ -25,6 +25,7 @@ import autosize from 'autosize'; import { SiteForm } from './site-form'; import { UserListing } from './user-listing'; import { HtmlTags } from './html-tags'; +import { Spinner } from './icon'; import { i18n } from '../i18next'; import { InitialFetchRequest } from 'shared/interfaces'; @@ -109,9 +110,7 @@ export class AdminSettings extends Component { /> {this.state.loading ? (
- - - +
) : (
@@ -185,9 +184,7 @@ export class AdminSettings extends Component {
); } diff --git a/src/shared/components/comment-form.tsx b/src/shared/components/comment-form.tsx index 53e79341..41420489 100644 --- a/src/shared/components/comment-form.tsx +++ b/src/shared/components/comment-form.tsx @@ -20,6 +20,7 @@ import { WebSocketService, UserService } from '../services'; import { i18n } from '../i18next'; import { T } from 'inferno-i18next'; import { MarkdownTextArea } from './markdown-textarea'; +import { Icon } from './icon'; interface CommentFormProps { postId?: number; @@ -84,9 +85,7 @@ export class CommentForm extends Component { /> ) : (