From 94f87d20f2075f03e01036d89852d53541f7952d Mon Sep 17 00:00:00 2001 From: Daniel Sil Date: Tue, 26 Mar 2024 15:35:25 +0100 Subject: [PATCH] docs: update v15 migration guide --- .../04-migration-guides/01-v15.mdx | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/src/documentation/05-development/04-migration-guides/01-v15.mdx b/docs/src/documentation/05-development/04-migration-guides/01-v15.mdx index ce747b13fd..e84e40c1bf 100644 --- a/docs/src/documentation/05-development/04-migration-guides/01-v15.mdx +++ b/docs/src/documentation/05-development/04-migration-guides/01-v15.mdx @@ -10,10 +10,41 @@ redirect_from: This migration guide focuses on the process of migrating from Orbit v14 to v15.0, as some breaking changes were introduced. With this guide, we aim to walk through all the breaking changes and how they can be addressed, allowing the migration to be smoother and effortlessly. +This version marks the removal of `styled-components`. The whole styling of Orbit components is now done using Tailwind exclusively. This also means that our support for `styled-components` related issues is now finished. + ## Breaking changes +### OrbitProvider changes + +The `OrbitProvider` component has changed and no longer includes the `ThemeProvider` from `styled-components`. + +**This should not have any impact if you are not using `styled-components` in your project.** + +The `useTheme` hook is still available and can be used to access the theme values, as usual. + +If you are still using `styled-components` in your project, you will need to wrap your application (and the `OrbitProvider`) with the `ThemeProvider` from `styled-components` and pass it the same `theme` you are passing to `OrbitProvider`. + +```jsx +import { ThemeProvider } from "styled-components"; +import { OrbitProvider } from "@kiwicom/orbit-components"; + +const App = () => ( + + + + + +); +``` + ### mediaQueries util function removed The `mediaQueries` function is no longer available. This was a styled-components util function that is now no longer expected to be used, as we move away from StyledComponents. If needed, the tokens and breakpoint values are still accessible via the `getBreakpointWidth` function and the `QUERIES` and `TOKEN` constants. Check [the documentation](/development/utilities/media-queries/) for more information on how to use these. + +### rtl utils removed + +The `rtl` utility functions have been removed. They were used to handle RTL styles in the `styled-components` version of Orbit. + +With the removal of `styled-components`, these functions are no longer available through `orbit-components`.