Explorar o código

更改消息圆点样式

zcj03 hai 7 meses
pai
achega
f91e54f5c5
Modificáronse 1 ficheiros con 16 adicións e 10 borrados
  1. 16 10
      src/components/Tabs/index.tsx

+ 16 - 10
src/components/Tabs/index.tsx

@@ -42,16 +42,22 @@ const Transactions: FC<PropsWithChildren<Props>> = (props) => {
                         key={tab.id}
                         className={styles.badge}
                         title={
-                            <Badge
-                                content={tab.content > 0 ? tab.content : null}
-                                style={{
-                                    "--right": "-0.1rem",
-                                    "--top": "8px",
-                                }}
-                                color={"#ff311b"}
-                            >
-                                {tab.name}
-                            </Badge>
+                            // <Badge
+                            //     content={tab.content > 0 ? tab.content : null}
+                            //     style={{
+                            //         "--right": "-0.1rem",
+                            //         "--top": "8px",
+                            //     }}
+                            //     color={"#ff311b"}
+                            // >
+                            //     {tab.name}
+                            // </Badge>
+                            <div style={{position: 'relative'}}>
+                              {tab.name}
+                              {
+                                tab.content > 0 && <div className={`mr-[0.1rem] h-[0.15rem] w-[0.15rem] text-[#fff] flex items-center justify-center`} style={{position: 'absolute', borderRadius: "0.075rem", backgroundColor: "#ff311b",  fontSize: "0.1rem", top: '-0.02rem', right: '-0.24rem'}}>{tab.content}</div>
+                              }
+                            </div>
                         }
                     >
                         {tab.render}