Skip to content

Commit 70b1f26

Browse files
committed
feat: add textarea min-lines
1 parent 1e517a6 commit 70b1f26

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

system/core/src/components/IconButton.ts

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export const fullStyles = css`
152152
&[data-mode='input-append'] {
153153
border-color: transparent !important;
154154
border-radius: calc(var(--border-radius-small) - 1px);
155+
align-self: flex-start;
155156
&:not([data-variant]) {
156157
${variantStyles.bare};
157158
}

system/core/src/components/InputWithIcons.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ export const fullStyles = css`
8282
var(--tk-input-icon-end-padding)
8383
);
8484
--tk-icon-button-padding: 8px !important;
85-
margin: 0 -11px 0 -6px;
85+
margin: 0 -9px 0 -6px;
8686
}
8787
&[data-size='small'] > [data-mode='input-append'] {
88-
margin: 0 -11px 0 -3px;
88+
margin: 0 -9px 0 -3px;
8989
}
9090
`;

system/core/src/components/TextAreaCore.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export const textareaSizingStyles = css`
1313
${inputStyles}
1414
width: var(--tk-input-width);
1515
--tk-textarea-height: calc(
16-
var(--tk-input-height) - (var(--tk-input-border-width) * 2)
16+
2lh + (var(--tk-input-border-width) * 2) +
17+
(var(--tk-input-vertical-padding) * 2)
1718
);
1819
min-height: var(--tk-textarea-height);
1920
resize: vertical;
@@ -44,6 +45,10 @@ export const textareaWrapperStyles = css`
4445
overflow: hidden;
4546
align-self: stretch;
4647
}
48+
& > svg {
49+
min-height: var(--tk-input-height);
50+
align-self: flex-start;
51+
}
4752
@supports (field-sizing: content) {
4853
&[data-content]:after {
4954
display: none;

system/core/src/components/TextAreaWithIcons.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ export const fullStyles = css`
101101
var(--tk-input-icon-end-padding)
102102
);
103103
--tk-icon-button-padding: 8px !important;
104-
margin: 0 -11px 0 -6px;
104+
margin: 0 -9px 0 -6px;
105105
}
106106
&[data-size='small'] > [data-mode='input-append'] {
107-
margin: 0 -11px 0 -3px;
107+
margin: 0 -9px 0 -3px;
108108
}
109109
`;

0 commit comments

Comments
 (0)