Skip to content

Commit 91a4fe3

Browse files
committed
fix: auto complete font size
1 parent 063ac43 commit 91a4fe3

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/components/auto-complete/auto-complete.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ const AutoCompleteComponent = React.forwardRef<HTMLInputElement, React.PropsWith
182182
clearable={showClearIcon}
183183
w={`var(--auto-input-width)`}
184184
h={`var(--auto-input-height)`}
185+
font={`var(--auto-font-size)`}
185186
iconRight={getSearchIcon(searching, getScaleProps('scale') as ScaleResponsiveParameter<number>)}
186187
{...inputProps}
187188
/>
@@ -200,6 +201,8 @@ const AutoCompleteComponent = React.forwardRef<HTMLInputElement, React.PropsWith
200201
width: max-content;
201202
}
202203
204+
${SCALE.font(0.875, value => `--auto-font-size: ${value};`, undefined, 'auto-complete')}
205+
203206
${SCALE.w(1, value => `width: ${value};`, 'max-content', 'auto-complete')}
204207
${SCALE.h(1, value => `height: ${value};`, 'auto', 'auto-complete')}
205208

src/components/input/input.tsx

+7-3
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ const InputComponent = React.forwardRef<HTMLInputElement, React.PropsWithChildre
143143
display: inline-block;
144144
box-sizing: border-box;
145145
-webkit-box-align: center;
146+
font-size: var(--input-font-size);
146147
}
147148
148149
.input-container {
@@ -197,6 +198,11 @@ const InputComponent = React.forwardRef<HTMLInputElement, React.PropsWithChildre
197198
--input-background: var(--color-background-900);
198199
}
199200
201+
202+
.font {
203+
font-size: var(--input-font-size);
204+
}
205+
200206
input.disabled {
201207
cursor: not-allowed;
202208
}
@@ -247,13 +253,11 @@ const InputComponent = React.forwardRef<HTMLInputElement, React.PropsWithChildre
247253
-webkit-text-fill-color: var(--input-color) !important;
248254
}
249255
250-
251256
${SCALE.padding(0, value => `padding: ${value.top} ${value.right} ${value.bottom} ${value.left};`, undefined, 'with-label')}
252257
${SCALE.margin(0, value => `margin: ${value.top} ${value.right} ${value.bottom} ${value.left};`, undefined, 'with-label')}
253258
${SCALE.w(1, value => `width: ${value};`, 'initial', 'with-label')}
254-
${SCALE.font(0.875, value => `font-size: ${value};`, undefined, 'with-label')}
259+
${SCALE.font(0.875, value => `--input-font-size: ${value};`, undefined, 'with-label')}
255260
${SCALE.h(2.25, value => `--input-height: ${value};`, undefined, 'with-label')}
256-
${SCALE.font(0.875, value => `font-size: ${value};`, undefined, 'font')}
257261
${SCALE.w(1, value => `width: ${value};`, 'initial', 'input-container')}
258262
${SCALE.r(1, value => `border-radius: ${value};`, 'var(--layout-radius)', 'input-wrapper')}
259263

0 commit comments

Comments
 (0)