Skip to content

Commit 2d10f47

Browse files
authored
Merge pull request #2203 from oasisprotocol/kaja/rofl-search
Table search input size change
2 parents 304e876 + eb78dec commit 2d10f47

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

.changelog/2203.bugfix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update font size of table search input.

src/app/components/Search/TableSearchBar.tsx

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,32 +38,15 @@ export interface TableSearchBarProps {
3838
autoFocus?: boolean
3939
}
4040

41-
type SizingInfo = {
42-
font: number | string
43-
}
44-
45-
const sizeMapping: Record<SearchBarSize, SizingInfo> = {
46-
small: {
47-
font: '1em',
48-
},
49-
medium: {
50-
font: '1.25em',
51-
},
52-
large: {
53-
font: '1.5em',
54-
},
55-
}
56-
5741
export const TableSearchBar: FC<TableSearchBarProps> = ({
5842
value,
5943
onChange,
6044
placeholder,
6145
warning,
6246
fullWidth,
63-
size = 'medium',
6447
autoFocus,
6548
onEnter,
66-
width = 250,
49+
width = 190,
6750
}) => {
6851
const { isTablet } = useScreenSize()
6952

@@ -165,10 +148,12 @@ export const TableSearchBar: FC<TableSearchBarProps> = ({
165148
InputProps={{
166149
inputProps: {
167150
sx: {
168-
p: 0,
151+
p: 2,
169152
width: fullWidth ? '100%' : width,
170153
margin: 2,
171-
fontSize: sizeMapping[size].font,
154+
marginLeft: 0,
155+
paddingLeft: 0,
156+
fontSize: '14px',
172157
},
173158
autoFocus,
174159
},

0 commit comments

Comments
 (0)