Skip to content

Commit 88a2cd3

Browse files
committed
docs: add more v7 breaking change info to migration docs
1 parent 5226835 commit 88a2cd3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

MIGRATING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ This doc contains information that will help you migrate your code from an older
66

77
## Breaking Changes
88

9-
- The `@smui/common/elements` components are gone. It is replaced with the `Element` component exported from `@smui/common`. It takes a `tag` prop and creates an element dynamically with that tag name.
9+
- The `@smui/common/elements` components are gone. They are replaced with the `SmuiElement` component exported from `@smui/common`. It takes a `tag` prop and creates an element dynamically with that tag name. There's also a `Svg` component exported from `@smui/common` if you need an svg.
10+
- The "\*ComponentDev" types (like `MenuComponentDev`) are gone. You can now use the component as its type. Components that can take a `component` or `tag` prop (like `Button`) have required generic arguments that you can get around by using "InstanceType", like `let button: InstanceType<typeof Button>;`.
11+
- If you're using `classAdderBuilder`, you need to use `keyof SmuiElementMap` instead of `string` as its generic argument.
1012

1113
# SMUI 5 -> SMUI 6
1214

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ If you need help using SMUI, join the [Discord server](https://discord.gg/aFzmkr
3434

3535
Upgrading from an old version? Be sure to read the [migration doc](MIGRATING.md).
3636

37+
Upgrading from v6? No more elemental components; you can now use the "tag" prop for HTML elements or the "Svg" component. No more "ComponentDev" types; components can now be used as their type. Check out the [upgrade instructions](MIGRATING.md#smui-6---smui-7).
38+
3739
Upgrading from v5? If you're still using the advanced styling method, it's really time to switch to the easy styling method. '/styled' endpoints are no longer provided. Check out the [upgrade instructions](MIGRATING.md#smui-5---smui-6).
3840

3941
Upgrading from v4? SMUI v5 requires the [TypeScript preprocessor](https://github.com/sveltejs/svelte-preprocess). SMUI v6 does not though, so if you upgrade straight to v6, don't worry. Check out the [upgrade instructions](MIGRATING.md#smui-4---smui-5).
@@ -46,6 +48,7 @@ Upgrading from v2? There are **lots** of changes listed in the [upgrade instruct
4648

4749
You can find older versions of the docs on their respective branch:
4850

51+
- [v6 docs](https://github.com/hperrin/svelte-material-ui/tree/v6#readme)
4952
- [v5 docs](https://github.com/hperrin/svelte-material-ui/tree/v5#readme)
5053
- [v4 docs](https://github.com/hperrin/svelte-material-ui/tree/v4#readme)
5154

0 commit comments

Comments
 (0)