From 3e0e040cb19f0f11c96780859d6a4ac16f08abc6 Mon Sep 17 00:00:00 2001 From: Awais Ansari <79941147+awais-ansari@users.noreply.github.com> Date: Thu, 11 Aug 2022 12:37:05 +0500 Subject: [PATCH] fix: style issues for new post and edit post form (#242) * fix: style issues for new post and edit post form * fix: post type cards width --- src/components/PostPreviewPane.jsx | 21 +++-- .../posts/post-editor/PostEditor.jsx | 88 ++++++++++--------- src/index.scss | 16 ++++ 3 files changed, 80 insertions(+), 45 deletions(-) diff --git a/src/components/PostPreviewPane.jsx b/src/components/PostPreviewPane.jsx index a51b1083..71477a9b 100644 --- a/src/components/PostPreviewPane.jsx +++ b/src/components/PostPreviewPane.jsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; -import { Button } from '@edx/paragon'; +import { Button, Icon, IconButton } from '@edx/paragon'; import { Close } from '@edx/paragon/icons'; import messages from '../discussions/posts/post-editor/messages'; @@ -16,9 +16,20 @@ function PostPreviewPane({ return ( <> {showPreviewPane && ( -
- setShowPreviewPane(false)} className="float-right text-primary-500 mb" /> - +
+ setShowPreviewPane(false)} + alt={intl.formatMessage(messages.actionsAlt)} + src={Close} + iconAs={Icon} + size="inline" + className="float-right p-3" + iconClassNames="icon-size" + /> +
)}
@@ -28,7 +39,7 @@ function PostPreviewPane({ variant="link" size="md" onClick={() => setShowPreviewPane(true)} - className={`text-primary-500 ${editExisting && 'mb-4.5'}`} + className={`text-primary-500 px-0 ${editExisting && 'mb-4.5'}`} > {intl.formatMessage(messages.showPreviewButton)} diff --git a/src/discussions/posts/post-editor/PostEditor.jsx b/src/discussions/posts/post-editor/PostEditor.jsx index 25003c83..5910a555 100644 --- a/src/discussions/posts/post-editor/PostEditor.jsx +++ b/src/discussions/posts/post-editor/PostEditor.jsx @@ -3,6 +3,7 @@ import React, { } from 'react'; import PropTypes from 'prop-types'; +import classNames from 'classnames'; import { Formik } from 'formik'; import { isEmpty } from 'lodash'; import { useDispatch, useSelector } from 'react-redux'; @@ -46,12 +47,18 @@ function DiscussionPostType({ }) { // Need to use regular label since Form.Label doesn't support overriding htmlFor return ( -