From c3b8a2f3dc974999867a9a0b2c60fa168afd12bb Mon Sep 17 00:00:00 2001 From: takurinton Date: Thu, 28 Dec 2023 08:26:32 +0900 Subject: [PATCH 1/2] add description of react-select custom components in migration guide v6 --- sections/faqs/migration-v6.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sections/faqs/migration-v6.mdx b/sections/faqs/migration-v6.mdx index cce74a9a..16bfd3ac 100644 --- a/sections/faqs/migration-v6.mdx +++ b/sections/faqs/migration-v6.mdx @@ -131,3 +131,9 @@ const ButtonLink = styled(Button).attrs({ as: 'a' })``; ### Minimum Node support raised to v16+ In line with the [maintenance schedule](https://github.com/nodejs/release#release-schedule) for Node, we now support v16 as the oldest runtime that's still receiving security patches. + +### If you are using react-select + +If you are creating a custom component using a styled-components theme, such as react-select, you need to pass the theme explicitly using [`attrs prop`](https://styled-components.com/docs/basics#attaching-additional-props). + +See [codesandbox](https://codesandbox.io/p/sandbox/styled-component-with-react-select-forked-m62nj4?file=%2Fexample.js) for specific example. \ No newline at end of file From 17a36ce3b00d5d0fb9ac8f5e9f7176a13a7ee451 Mon Sep 17 00:00:00 2001 From: takurinton Date: Thu, 28 Dec 2023 15:21:14 +0900 Subject: [PATCH 2/2] Update migration-v6.mdx --- sections/faqs/migration-v6.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sections/faqs/migration-v6.mdx b/sections/faqs/migration-v6.mdx index 16bfd3ac..04381a0d 100644 --- a/sections/faqs/migration-v6.mdx +++ b/sections/faqs/migration-v6.mdx @@ -134,6 +134,6 @@ In line with the [maintenance schedule](https://github.com/nodejs/release#releas ### If you are using react-select -If you are creating a custom component using a styled-components theme, such as react-select, you need to pass the theme explicitly using [`attrs prop`](https://styled-components.com/docs/basics#attaching-additional-props). +If you are creating a custom component using a styled-components theme, such as react-select, you need to pass the theme explicitly using [`.attrs` constructor](https://styled-components.com/docs/api#attrs). -See [codesandbox](https://codesandbox.io/p/sandbox/styled-component-with-react-select-forked-m62nj4?file=%2Fexample.js) for specific example. \ No newline at end of file +See [codesandbox](https://codesandbox.io/p/sandbox/styled-component-with-react-select-forked-m62nj4?file=%2Fexample.js) for specific example.