-
Notifications
You must be signed in to change notification settings - Fork 13
Migrating to v2
Along with the additions that come along with this update, here are some notable breakages or warnings you need to be aware of.
- @lifesg/react-icons
- Calendar
- Date inputs
- Timepicker
- InputMultiSelect
- InputRangeSelect
- IconButton
- Popover
- Others
-
@lifesg/react-icons
is now a peer dependency. If you rely on--legacy-peer-deps
or are < npm 7, you will need to add@lifesg/react-icons
to your project dependencies.
- The
between
prop has been replaced withminDate
andmaxDate
for more flexibility
- We have split the ranged selection in
DateInput
into a separate component calledDateRangeInput
. As such all props relating to ranged selections have been removed fromDateInput
. - The
between
prop has also been replaced withminDate
andmaxDate
for more flexibility -
onChange
is only invoked when a valid selection is made
- The 12hr formatted values will be in uppercase (i.e. am/pm will be AM/PM)
-
TimeRangePicker
format now defaults to 24hr to remain consistent withTimepicker
. You will need to setformat="12hr"
explicitly.
The import path has been amended to
import { InputMultiSelect } from "@lifesg/react-design-system/input-multi-select";
If you are importing from Form
, there are no changes required.
The import path has been amended to
import { InputRangeSelect } from "@lifesg/react-design-system/input-range-select";
If you are importing from Form
, there are no changes required.
The component has been reworked to match the existing Button
. The focusHighlight
and focusOutline
props are no longer available.
The default z-index has been increased from 2
to 50
. Verify if the current usage in your page may unintentionally block other elements.
Help! I get a
Cannot read property 'font' of undefined
error in my tests
If you're using the one of the dropdown components (for example, InputSelect
), set up jest-canvas-mock
in your tests as per the instructions in https://www.npmjs.com/package/jest-canvas-mock