Skip to content

Commit

Permalink
feat: add textarea min-lines
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonC committed Aug 7, 2024
1 parent 1e517a6 commit 70b1f26
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions system/core/src/components/IconButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export const fullStyles = css`
&[data-mode='input-append'] {
border-color: transparent !important;
border-radius: calc(var(--border-radius-small) - 1px);
align-self: flex-start;
&:not([data-variant]) {
${variantStyles.bare};
}
Expand Down
4 changes: 2 additions & 2 deletions system/core/src/components/InputWithIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ export const fullStyles = css`
var(--tk-input-icon-end-padding)
);
--tk-icon-button-padding: 8px !important;
margin: 0 -11px 0 -6px;
margin: 0 -9px 0 -6px;
}
&[data-size='small'] > [data-mode='input-append'] {
margin: 0 -11px 0 -3px;
margin: 0 -9px 0 -3px;
}
`;
7 changes: 6 additions & 1 deletion system/core/src/components/TextAreaCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export const textareaSizingStyles = css`
${inputStyles}
width: var(--tk-input-width);
--tk-textarea-height: calc(
var(--tk-input-height) - (var(--tk-input-border-width) * 2)
2lh + (var(--tk-input-border-width) * 2) +
(var(--tk-input-vertical-padding) * 2)
);
min-height: var(--tk-textarea-height);
resize: vertical;
Expand Down Expand Up @@ -44,6 +45,10 @@ export const textareaWrapperStyles = css`
overflow: hidden;
align-self: stretch;
}
& > svg {
min-height: var(--tk-input-height);
align-self: flex-start;
}
@supports (field-sizing: content) {
&[data-content]:after {
display: none;
Expand Down
4 changes: 2 additions & 2 deletions system/core/src/components/TextAreaWithIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ export const fullStyles = css`
var(--tk-input-icon-end-padding)
);
--tk-icon-button-padding: 8px !important;
margin: 0 -11px 0 -6px;
margin: 0 -9px 0 -6px;
}
&[data-size='small'] > [data-mode='input-append'] {
margin: 0 -11px 0 -3px;
margin: 0 -9px 0 -3px;
}
`;

0 comments on commit 70b1f26

Please sign in to comment.