UNPKG

1.65 kBMarkdownView Raw
1# Migrating from v6.x to v7.x
2
3Version 7 of Rendition includes several breaking changes mostly due to upgrade in styled
4components and styled system. Note that you might also need to migrate to styled-components v4, so make sure
5to check their migration guide as well. This document aims to list these changes and provide a migration path for users wanting to upgrade.
6
7## Removed
8
9- All components have to be wrapped in the `Provider` component in order to
10have the rendition theme passed to them. Originally, all components wrapped in
11`asRendition` HOC would have a default theme set if they were not wrapped in a `Provider`
12
13## Renamed
14
15- `w` prop has been replaced by `width`.
16- `f` prop has been replaced by `fontSize`
17- `wrap` prop has been replaced by `flexWrap`
18- `align` prop has been replaced by `alignItems` (Note: `Txt` component's `align` refers to `textAlign`, so that is something you should be careful about).
19- `justify` prop has been replaced by `justifyContent`
20- `direction` prop has been replaced by `flexDirection`
21
22## Changed
23
24- The `flexWrap` (previously `wrap`) value changed from a `boolean`
25to a `string` (following CSS definition).
26
27## Typings
28
29- Removed LinkBaseProps, ButtonBaseProps, and FixedBaseProps exports (can be replaced with LinkProps, ButtonProps, FixedProps)
30- Removed ThemedBadgeProps, ThemedButtonProps, ThemedInputProps, ThemedModalProps, ThemedProgressBarProps, ThemedProvider, ThemedTerminalProps, ThemedTxtProps as they are not meant to be used directly (but are passed using a Provider).
31- Made exported components' typings a bit more accurate, reflecting whether they are wrapped by styled components.
\No newline at end of file