From 1fc1add1737839d7da5fe05d0455922f0bb6d22b Mon Sep 17 00:00:00 2001
From: Evan Jacobs <570070+probablyup@users.noreply.github.com>
Date: Thu, 25 May 2023 11:21:46 -0400
Subject: [PATCH] v6 docs (#919)
* docs: add v6 migration guide
* docs: remove references to withComponent() API
* docs: update StyleSheetManager
* docs: use tsx syntax in example code
* docs: remove Flow section, update TS section
* chore: link v6 migration doc
---
.lintstagedrc.js | 2 +-
pages/docs.json | 6 +-
pages/docs/api.mdx | 2 -
pages/docs/faqs.mdx | 8 +-
pages/index.js | 2 +-
sections/advanced/components-as-selectors.mdx | 4 +-
sections/advanced/existing-css.mdx | 8 +-
sections/advanced/security.mdx | 2 +-
sections/advanced/server-side-rendering.mdx | 8 +-
sections/advanced/style-objects.mdx | 6 +-
.../advanced/tagged-template-literals.mdx | 12 +--
sections/advanced/theming.mdx | 6 +-
sections/api/flow.mdx | 27 ------
sections/api/helpers/create-global-style.mdx | 16 ++--
sections/api/helpers/css.mdx | 15 ++-
sections/api/helpers/is-styled-component.mdx | 2 +-
sections/api/helpers/keyframes.mdx | 14 ++-
sections/api/helpers/style-sheet-manager.mdx | 69 +++++++-------
sections/api/helpers/theme-consumer.mdx | 2 +-
sections/api/helpers/use-theme.mdx | 2 +-
sections/api/helpers/with-theme.mdx | 2 +-
sections/api/old/extend.mdx | 2 +-
sections/api/old/inject-global.mdx | 2 +-
sections/api/old/inner-ref.mdx | 2 +-
sections/api/primary/css-prop.mdx | 4 +-
sections/api/primary/styled-component.mdx | 18 ----
.../api/primary/tagged-template-literal.mdx | 6 +-
sections/api/test-utils/enzyme-find.mdx | 2 +-
sections/api/test-utils/find-all.mdx | 2 +-
sections/api/test-utils/find.mdx | 2 +-
sections/api/typescript.mdx | 34 ++-----
sections/basics/adapting-based-on-props.mdx | 2 +-
.../basics/attaching-additional-props.mdx | 18 ++--
sections/basics/coming-from-css.mdx | 8 +-
sections/basics/extending-styles.mdx | 2 -
sections/basics/installation.mdx | 2 +-
sections/basics/passed-props.mdx | 6 +-
sections/basics/react-native.mdx | 4 +-
.../declare-components-in-render-method.mdx | 4 +-
sections/faqs/html-attribute-warnings.mdx | 6 +-
sections/faqs/migration-v4.mdx | 26 +++---
sections/faqs/migration-v6.mdx | 93 +++++++++++++++++++
sections/faqs/npm-link.mdx | 2 +-
sections/faqs/override-inline-styles.mdx | 2 +-
...verride-styles-with-higher-specificity.mdx | 2 +-
sections/faqs/reverse-selectors.mdx | 2 +-
sections/faqs/when-to-use-attrs.mdx | 2 +-
sections/homepage/getting-started.mdx | 10 +-
sections/tooling/babel-macro.mdx | 4 +-
sections/tooling/babel-plugin.mdx | 16 ++--
sections/tooling/jest.mdx | 6 +-
sections/tooling/styled-theming.mdx | 22 ++---
sections/tooling/stylelint.mdx | 20 ++--
53 files changed, 297 insertions(+), 251 deletions(-)
delete mode 100644 sections/api/flow.mdx
create mode 100644 sections/faqs/migration-v6.mdx
diff --git a/.lintstagedrc.js b/.lintstagedrc.js
index 313a9067d..763d5bc9c 100644
--- a/.lintstagedrc.js
+++ b/.lintstagedrc.js
@@ -1,3 +1,3 @@
module.exports = {
- '**/*.{js,jsx,ts,tsx}': ['jest -c .jest.config.js --findRelatedTests', 'prettier --write'],
+ '**/*.{js,jsx,ts,tsx}': ['jest -c .jest.config.js --findRelatedTests --passWithNoTests', 'prettier --write'],
};
diff --git a/pages/docs.json b/pages/docs.json
index 37486a681..556bfe4c8 100644
--- a/pages/docs.json
+++ b/pages/docs.json
@@ -85,9 +85,6 @@
{
"title": "Supported CSS"
},
- {
- "title": "Flow"
- },
{
"title": "TypeScript"
},
@@ -127,6 +124,9 @@
"title": "FAQs",
"pathname": "faqs",
"sections": [
+ {
+ "title": "What do I need to do to migrate to v6?"
+ },
{
"title": "What do I need to do to migrate to v5?"
},
diff --git a/pages/docs/api.mdx b/pages/docs/api.mdx
index a9b90e7f7..1cdfd9f38 100644
--- a/pages/docs/api.mdx
+++ b/pages/docs/api.mdx
@@ -4,7 +4,6 @@ import NextPage from '../../components/NextPage'
import Primary from '../../sections/api/primary/index.mdx'
import Helpers from '../../sections/api/helpers/index.mdx'
import SupportedCSS from '../../sections/api/supported-css.mdx'
-import Flow from '../../sections/api/flow.mdx'
import TypeScript from '../../sections/api/typescript.mdx'
import OldAPIs from '../../sections/api/old/index.mdx'
import TestUtilities from '../../sections/api/test-utils/index.mdx'
@@ -19,7 +18,6 @@ export default ({ children }) => (