Follow these steps to migrate from v1 to v2
- Remove any references to legacy color values
- Remove the
legacy
prop from ThemeProvider - Remove the
legacy
prop from Icon - Ensure no imports are targeting files within the
dist/
directory (e.g. useimport { Box } from 'pcln-design-system'
; NOTimport Box from 'pcln-design-system/dist/Box'
) - Replace any legacy icons with new ones
- Change Flex
align
prop toalignItems
- Change Flex
justify
prop tojustifyContent
- Change Flex
wrap
prop toflexWrap='wrap'
- Change Box
align
prop totextAlign
- Change Text
align
prop totextAlign
- Change Text
bold
prop tofontWeight='bold'
- The Text
italic
prop has been removed. Use styled-components or the<i>
tag to use italic styles. - Change Flex and Box prop
w
withwidth
- Change Button
fullWidth
prop towidth={1}
- If you're using the
customBreakpoints
prop in the ThemeProvider, ensure the values in the array are strings withem
units - Ensure Heading component has appropriately set styles. If your application relied on the styles with the
Heading.h1
–Heading.h6
semantic components, use the newtextStyle
prop to set styles (e.g.<Heading.h1 textStyle='display6' />
) - Account for other typographic changes (#231)
- Update dependencies if your application has the following in its
package.json
:styled-components
>=2.0.0 || >=3.0.0 || >=4.0.0styled-system
>=3.0.0
- The default behavior of FormField labels has changed. Use the Label
autoHide
prop instead of the FormFieldalwaysShowLabel
prop. - Account for ThemeProvider no longer using the deprecated
injectGlobal
therby not settingbody { margin: 0 }