-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(multiline text input): multiple adjustments (#2845)
* feat(multiline text input): multiple adjustments * feat(multiline text input): use secondary button * feat(multiline text input): update readme * feat(multiline text input): add missing dependency * feat(multiline text input): make maxRows optional * feat(multiline text input): update vrt * feat(multiline text input): update package version * feat(multiline text input): add additional vrt case * feat(multiline text input): add additional vrt case * feat(multiline text input): update component cashed measurements * feat(multiline text input): increase max rows in storybook --------- Co-authored-by: Ddouglasz <douglas.egiemeh@gmail.com>
- Loading branch information
Showing
10 changed files
with
211 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@commercetools-uikit/multiline-text-input': minor | ||
'@commercetools-uikit/input-utils': minor | ||
--- | ||
|
||
Multiple adjustments introduced to the multiline text input which now allows users to be able to add an action icon button of choice to the top right position of the text area, add the condensed feature to accomodate more text and finally, limit text rows as a way of controlling text area height. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/components/inputs/multiline-text-input/src/multiline-text-input.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { css } from '@emotion/react'; | ||
import styled from '@emotion/styled'; | ||
import { designTokens } from '@commercetools-uikit/design-system'; | ||
import { type TMultilineTextInputProps } from './multiline-text-input'; | ||
|
||
const getMultilineTextInputActionIconStyles = ( | ||
props: TMultilineTextInputProps | ||
) => css` | ||
position: absolute; | ||
right: ${designTokens.spacing30}; | ||
top: 0; | ||
height: ${props.isCondensed | ||
? `${designTokens.heightForInputAsSmall}` | ||
: `${designTokens.heightForInput}`}; | ||
padding: 0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
`; | ||
|
||
const MultilineInputWrapper = styled.div` | ||
position: relative; | ||
display: inline-block; | ||
width: 100%; | ||
`; | ||
|
||
export { getMultilineTextInputActionIconStyles, MultilineInputWrapper }; |
Oops, something went wrong.