File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type WithIconProps = CommonProps & {
15
15
/**
16
16
* The Icon used to render `InputRightElement` on the right side of the input
17
17
*/
18
- rightIcon ? : JSX . Element
18
+ rightIcon : JSX . Element
19
19
/**
20
20
* Primarily for style props to be applied to the wrapper
21
21
*/
Original file line number Diff line number Diff line change 1
1
import {
2
2
Box ,
3
+ CloseButton ,
3
4
Flex ,
4
5
Heading ,
5
6
IconButton ,
@@ -98,17 +99,14 @@ const LanguagesPage = ({ location }: PageProps<Queries.LanguagesPageQuery>) => {
98
99
placeholder = { searchString }
99
100
onChange = { ( e ) => setKeyword ( e . target . value ) }
100
101
rightIcon = {
101
- keyword !== "" ? (
102
- < IconButton
103
- icon = { < MdClose /> }
104
- onClick = { resetKeyword }
105
- position = "absolute"
106
- insetInlineEnd = { 1 }
107
- aria-label = { t ( "clear" ) }
108
- variant = "ghost"
109
- _hover = { { svg : { fill : "primary" } } }
110
- />
111
- ) : undefined
102
+ < IconButton
103
+ icon = { < MdClose /> }
104
+ onClick = { resetKeyword }
105
+ display = { keyword === "" ? "none" : undefined }
106
+ aria-label = { t ( "clear" ) }
107
+ variant = "ghost"
108
+ _hover = { { svg : { fill : "primary" } } }
109
+ />
112
110
}
113
111
/>
114
112
</ Box >
You can’t perform that action at this time.
0 commit comments