GetTerminus / terminus-oss

A collection of open source libraries.
MIT License
11 stars 10 forks source link

Input redesign & cache updates #482

Closed benjamincharity closed 3 years ago

benjamincharity commented 3 years ago

Migration notes for @terminus/ui-input@3.0.0

No longer supporting:

  1. prefix icon
  2. suffix icon
  3. theme
  4. built in validation messages

Prefix and Suffix icons

<ts-input
-  prefixIcon="faHome"
-  suffixIcon="faCancel"
></ts-input>

Designs won't have prefix or suffix icons going forward. The input component still supports the clear icon and the datepicker icon. Any other components (such as Search) will need to add their own prefix/suffix support as needed.

Theme

<ts-input
-  theme="warn"
></ts-input>

Validation messages

Pulling validation messages from the form control was a pain point for some teams; especially as they approach localization. Now the input accepts a string error message:

<ts-input
+  errorMessage="A valid email address is required."
></ts-input>

https://www.chromatic.com/component?appId=5f0ca4e61af3790022cad2fe&name=Components%2FData+Entry%2FInput&buildNumber=263