diff --git a/docs/docs/examples/styling.mdx b/docs/docs/examples/styling.mdx
index ebce197f..3134a606 100644
--- a/docs/docs/examples/styling.mdx
+++ b/docs/docs/examples/styling.mdx
@@ -385,10 +385,12 @@ We strongly recommend using this way because it's cleaner and better for perform
:::
-| name | type | required | default | values | description |
-| ----------------------------------- | --------- | -------- | ------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `REACT_TOOLTIP_DISABLE_CORE_STYLES` | `boolean` | no | `false` | `true` `false` | Environment variable to disable **core** styles from being injected into the page by ReactTooltip.
We strongly recommend to keep the core styles being injected into the project unless you know what you are doing. |
-| `REACT_TOOLTIP_DISABLE_BASE_STYLES` | `boolean` | no | `false` | `true` `false` | Environment variable to disable **base** styles from being injected into the page by ReactTooltip.
Those styles are just visual styles like colors, padding, etc... And can be disabled if you want to write your tooltip styles. |
+| name | type | required | default | values | description |
+| --------------------------------------------- | --------- | -------- | ------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `REACT_TOOLTIP_DISABLE_CORE_STYLES` | `boolean` | no | `false` | `true` `false` | Environment variable to disable **core** styles from being injected into the page by ReactTooltip.
We strongly recommend to keep the core styles being injected into the project unless you know what you are doing. |
+| `REACT_TOOLTIP_DISABLE_BASE_STYLES` | `boolean` | no | `false` | `true` `false` | Environment variable to disable **base** styles from being injected into the page by ReactTooltip.
Those styles are just visual styles like colors, padding, etc... And can be disabled if you want to write your tooltip styles. |
+| `REACT_APP_REACT_TOOLTIP_DISABLE_CORE_STYLES` | `boolean` | no | `false` | `true` `false` | Same as `REACT_TOOLTIP_DISABLE_CORE_STYLES` but with `REACT_APP_` prefix. Set this instead if your project uses `react-scripts`. |
+| `REACT_APP_REACT_TOOLTIP_DISABLE_BASE_STYLES` | `boolean` | no | `false` | `true` `false` | Same as `REACT_TOOLTIP_DISABLE_BASE_STYLES` but with `REACT_APP_` prefix. Set this instead if your project uses `react-scripts`. |
#### Using removeStyle function
diff --git a/docs/docs/options.mdx b/docs/docs/options.mdx
index 0e749f9f..2cc021ce 100644
--- a/docs/docs/options.mdx
+++ b/docs/docs/options.mdx
@@ -130,7 +130,9 @@ We have some environment variables that can be used to enable or disable some be
#### Available environment variables:
-| name | type | required | default | values | description |
-| ----------------------------------- | --------- | -------- | ------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `REACT_TOOLTIP_DISABLE_CORE_STYLES` | `boolean` | no | `false` | `true` `false` | Environment variable to disable **core** styles from being injected into the page by ReactTooltip.
We strongly recommend to keep the core styles being injected into the project unless you know what you are doing. |
-| `REACT_TOOLTIP_DISABLE_BASE_STYLES` | `boolean` | no | `false` | `true` `false` | Environment variable to disable **base** styles from being injected into the page by ReactTooltip.
Those styles are just visual styles like colors, padding, etc... And can be disabled if you want to write your tooltip styles. |
+| name | type | required | default | values | description |
+| --------------------------------------------- | --------- | -------- | ------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `REACT_TOOLTIP_DISABLE_CORE_STYLES` | `boolean` | no | `false` | `true` `false` | Environment variable to disable **core** styles from being injected into the page by ReactTooltip.
We strongly recommend to keep the core styles being injected into the project unless you know what you are doing. |
+| `REACT_TOOLTIP_DISABLE_BASE_STYLES` | `boolean` | no | `false` | `true` `false` | Environment variable to disable **base** styles from being injected into the page by ReactTooltip.
Those styles are just visual styles like colors, padding, etc... And can be disabled if you want to write your tooltip styles. |
+| `REACT_APP_REACT_TOOLTIP_DISABLE_CORE_STYLES` | `boolean` | no | `false` | `true` `false` | Same as `REACT_TOOLTIP_DISABLE_CORE_STYLES` but with `REACT_APP_` prefix. Set this instead if your project uses `react-scripts`. |
+| `REACT_APP_REACT_TOOLTIP_DISABLE_BASE_STYLES` | `boolean` | no | `false` | `true` `false` | Same as `REACT_TOOLTIP_DISABLE_BASE_STYLES` but with `REACT_APP_` prefix. Set this instead if your project uses `react-scripts`. |
diff --git a/src/utils/handle-style.ts b/src/utils/handle-style.ts
index 7deb84ba..4ab2ff47 100644
--- a/src/utils/handle-style.ts
+++ b/src/utils/handle-style.ts
@@ -18,7 +18,8 @@ function injectStyle({
if (
type === 'core' &&
typeof process !== 'undefined' && // this validation prevents docs from breaking even with `process?`
- process?.env?.REACT_TOOLTIP_DISABLE_CORE_STYLES
+ (process?.env?.REACT_TOOLTIP_DISABLE_CORE_STYLES ||
+ process?.env?.REACT_APP_REACT_TOOLTIP_DISABLE_CORE_STYLES)
) {
return
}
@@ -26,7 +27,8 @@ function injectStyle({
if (
type !== 'core' &&
typeof process !== 'undefined' && // this validation prevents docs from breaking even with `process?`
- process?.env?.REACT_TOOLTIP_DISABLE_BASE_STYLES
+ (process?.env?.REACT_TOOLTIP_DISABLE_BASE_STYLES ||
+ process?.env?.REACT_APP_REACT_TOOLTIP_DISABLE_BASE_STYLES)
) {
return
}