File tree Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Original file line number Diff line number Diff line change 1- import styled from "styled-components" ;
2- import { borderBox } from "../styles/common-style" ;
3-
1+ import React from "react" ;
2+ import { cn } from "../utils" ;
43interface DotProps {
54 color : string ;
5+ className ?: string ;
66}
77
8- const Dot = styled . div < DotProps > `
9- ${ borderBox }
10- background: ${ ( { color } ) => color } ;
11- border-radius: 50%;
12- width: 8px;
13- height: 8px;
14- ` ;
15-
8+ function Dot ( { color , className } : Readonly < DotProps > ) {
9+ return (
10+ < div
11+ style = { { background : color } }
12+ className = { cn ( "box-border h-2 w-2 rounded-full" , className ) }
13+ />
14+ ) ;
15+ }
1616export default Dot ;
Original file line number Diff line number Diff line change @@ -47,10 +47,6 @@ const StyledText = styled.p`
4747 user-select: none;
4848` ;
4949
50- const StyledDot = styled ( Dot ) `
51- margin-right: 8px;
52- ` ;
53-
5450const CountDisplay = styled . label `
5551 width: 24px;
5652 height: 24px;
@@ -89,7 +85,7 @@ const BaseItem: React.FC<IBaseItem> = ({
8985 { ...{ onClick, ...props } }
9086 >
9187 { icon ?? ( Icon && < Icon className = "item-icon" /> ) }
92- { dot && < StyledDot color = { dot } /> }
88+ { dot && < Dot className = "mr-2" color = { dot } /> }
9389 < StyledText > { text } </ StyledText >
9490 { childrenCount !== undefined ? (
9591 < CountDisplay className = "count-display" >
You can’t perform that action at this time.
0 commit comments