Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix(style): Make `.small` work correctly on `button`

haitaoo27432c6ee2d4
diff --git a/ui/src/components/Comment/index.tsx b/ui/src/components/Comment/index.tsx
index 1e87520e..66a5229c 100644
--- a/ui/src/components/Comment/index.tsx
+++ b/ui/src/components/Comment/index.tsx
@@ -306,7 +306,8 @@ const Comment = ({ objectId, mode, commentId }) => {
<div className="mt-2">
<Button
variant="link"
- className="p-0 small btn-no-border"
+ className="p-0 btn-no-border"
+ size="sm"
onClick={() => {
if (tryNormalLogged(true)) {
setVisibleComment(!visibleComment);
@@ -317,7 +318,8 @@ const Comment = ({ objectId, mode, commentId }) => {
{data && (pageIndex || 1) < Math.ceil((data?.count || 0) / pageSize) && (
<Button
variant="link"
- className="p-0 small ms-3 btn-no-border"
+ size="sm"
+ className="p-0 ms-3 btn-no-border"
onClick={() => {
setPageIndex(pageIndex + 1);
}}>
diff --git a/ui/src/components/Operate/index.tsx b/ui/src/components/Operate/index.tsx
index 05486156..6bcf2c2f 100644
--- a/ui/src/components/Operate/index.tsx
+++ b/ui/src/components/Operate/index.tsx
@@ -263,7 +263,8 @@ const Index: FC<IProps> = ({
<Button
key={item.action}
variant="link"
- className="link-secondary p-0 small ms-3"
+ size="sm"
+ className="link-secondary p-0 ms-3"
onClick={() => handleAction(item.action)}>
{item.name}
</Button>
@@ -273,7 +274,8 @@ const Index: FC<IProps> = ({
<Dropdown className="ms-3">
<Dropdown.Toggle
variant="link"
- className="link-secondary p-0 small no-toggle">
+ size="sm"
+ className="link-secondary p-0 no-toggle">
{t('action', { keyPrefix: 'question_detail' })}
</Dropdown.Toggle>
<Dropdown.Menu>
diff --git a/ui/src/pages/Tags/Info/index.tsx b/ui/src/pages/Tags/Info/index.tsx
index c5867617..c56b29e1 100644
--- a/ui/src/pages/Tags/Info/index.tsx
+++ b/ui/src/pages/Tags/Info/index.tsx
@@ -162,8 +162,9 @@ const TagIntroduction = () => {
<Button
key={action.name}
variant="link"
+ size="sm"
className={classNames(
- 'link-secondary btn-no-border p-0 small',
+ 'link-secondary btn-no-border p-0',
index > 0 && 'ms-3',
)}
onClick={() => onAction(action)}>