Skip to content

Commit

Permalink
fix(DateInput): disable normalize of <Text /> for resolve css order i…
Browse files Browse the repository at this point in the history
…ssue
  • Loading branch information
inomdzhon committed Mar 5, 2024
1 parent 54624b8 commit 0b3049f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DateInput__input {
display: block;
flex-grow: 1;
margin-inline: 10px 14px;
z-index: var(--vkui_internal--z_index_form_field_element);
Expand Down
9 changes: 8 additions & 1 deletion packages/vkui/src/components/DateInput/DateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,14 @@ export const DateInput = ({
name={name}
value={value ? format(value, enableTime ? 'DD.MM.YYYYTHH:mm' : 'DD.MM.YYYY') : ''}
/>
<Text className={styles['DateInput__input']} onKeyDown={handleKeyDown}>
<Text
className={styles['DateInput__input']}
onKeyDown={handleKeyDown}
// Инцидент: в PR https://github.com/VKCOM/VKUI/pull/6649 стабильно ломается порядок стилей
// из-за чего `.Typography--normalize` перебивает стили.
normalize={false}
Component="span" // для <span> нормализация не нужна
>
<InputLike
length={2}
getRootRef={daysRef}
Expand Down

0 comments on commit 0b3049f

Please sign in to comment.