Skip to content

Commit 2fda895

Browse files
committed
feat(css): Add specific classes for customization purposes
1 parent 7a6acc5 commit 2fda895

File tree

15 files changed

+28
-20
lines changed

15 files changed

+28
-20
lines changed

ui/src/components/Comment/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ const Comment = ({ objectId, mode, commentId }) => {
309309
);
310310
};
311311
return (
312-
<div className="comments-wrap">
312+
<div className="answer_comments comments-wrap">
313313
{comments.map((item, index) => {
314314
return (
315315
<div

ui/src/components/FollowingTags/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const Index: FC = () => {
3535
return null;
3636
}
3737
return isEdit ? (
38-
<Card className="mb-4">
38+
<Card className="answer_following-tags mb-4">
3939
<Card.Header className="text-nowrap d-flex justify-content-between">
4040
{t('following_tags')}
4141
<Button
@@ -56,7 +56,7 @@ const Index: FC = () => {
5656
</Card.Body>
5757
</Card>
5858
) : (
59-
<Card className="mb-4">
59+
<Card className="answer_following-tags mb-4">
6060
<Card.Header className="text-nowrap d-flex justify-content-between text-capitalize">
6161
{t('following_tags')}
6262
<Button

ui/src/components/Footer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Index = () => {
1111
const siteName = siteInfoStore((state) => state.siteInfo.name);
1212
const cc = `${fullYear} ${siteName}`;
1313
return (
14-
<footer className="bg-light">
14+
<footer className="answer_footer bg-light">
1515
<Container className="py-3">
1616
<p className="text-center mb-0 small text-secondary">
1717
<Trans i18nKey="footer.build_on" values={{ cc }}>

ui/src/components/Header/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const Header: FC = () => {
112112
<Navbar
113113
variant={navbarStyle === 'theme-colored' ? 'dark' : ''}
114114
expand="lg"
115-
className={classnames('sticky-top', navbarStyle)}
115+
className={classnames('answer_header', 'sticky-top', navbarStyle)}
116116
id="header">
117117
<Container className="d-flex align-items-center">
118118
<Navbar.Toggle

ui/src/components/HotQuestions/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const HotQuestions: FC = () => {
1414
return null;
1515
}
1616
return (
17-
<Card>
17+
<Card className="answer_hot-questions">
1818
<Card.Header className="text-nowrap text-capitalize">
1919
{t('hot_questions')}
2020
</Card.Header>

ui/src/components/PluginRender/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const Index: FC<Props> = ({ slug_name, type, children, ...props }) => {
6060
const PluginFC = ps.component;
6161
return (
6262
// @ts-ignore
63-
<PluginFC key={ps.info.slug_name} {...props}>
63+
<PluginFC className="answer_plugin" key={ps.info.slug_name} {...props}>
6464
{children}
6565
</PluginFC>
6666
);

ui/src/components/QuestionList/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const QuestionList: FC<Props> = ({
4747
const count = data?.count || 0;
4848
return (
4949
<div>
50-
<div className="mb-3 d-flex flex-wrap justify-content-between">
50+
<div className="answer_questions-head mb-3 d-flex flex-wrap justify-content-between">
5151
<h5 className="fs-5 text-nowrap mb-3 mb-md-0">
5252
{source === 'questions'
5353
? t('all_questions')
@@ -60,7 +60,7 @@ const QuestionList: FC<Props> = ({
6060
i18nKeyPrefix="question"
6161
/>
6262
</div>
63-
<ListGroup className="rounded-0">
63+
<ListGroup className="answer_questions-list rounded-0">
6464
{isLoading ? (
6565
<QuestionListLoader />
6666
) : (

ui/src/pages/Questions/Detail/components/Answer/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { Button, Alert, Badge } from 'react-bootstrap';
33
import { useTranslation } from 'react-i18next';
44
import { Link, useSearchParams } from 'react-router-dom';
55

6+
import classNames from 'classnames';
7+
68
import {
79
Actions,
810
Operate,
@@ -73,7 +75,13 @@ const Index: FC<Props> = ({
7375
}
7476

7577
return (
76-
<div id={data.id} ref={answerRef} className="answer-item py-4">
78+
<div
79+
id={data.id}
80+
ref={answerRef}
81+
className={classNames(
82+
'answer_answer answer-item py-4',
83+
data?.accepted === 2 && 'answer_answer-accepted',
84+
)}>
7785
{data.status === 10 && (
7886
<Alert variant="danger" className="mb-4">
7987
{t('post_deleted', { keyPrefix: 'messages' })}

ui/src/pages/Questions/Detail/components/InviteToAnswer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const Index: FC<Props> = ({ questionId, readOnly = false }) => {
9595
}
9696

9797
return (
98-
<Card className="mt-4">
98+
<Card className="answer_people-asked mt-4">
9999
<Card.Header className="text-nowrap d-flex justify-content-between text-capitalize">
100100
{t('title')}
101101
{showSaveButton ? (

ui/src/pages/Questions/Detail/components/Question/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer, isLogged }) => {
6565
}
6666

6767
return (
68-
<div>
69-
<h1 className="h3 mb-3 text-wrap text-break">
68+
<div className="answer_question-asked">
69+
<h1 className="answer_question-title h3 mb-3 text-wrap text-break">
7070
{data?.pin === 2 && (
7171
<Icon
7272
name="pin-fill"

0 commit comments

Comments
 (0)