Skip to content

Commit

Permalink
Merge pull request #1126 from ReactTooltip/fix/docs-css
Browse files Browse the repository at this point in the history
fix: custom css was broken on docs on production build
  • Loading branch information
danielbarion committed Nov 21, 2023
2 parents 30c950c + 8bffb68 commit 56a7ba1
Show file tree
Hide file tree
Showing 5 changed files with 823 additions and 185 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ React Tooltip is proud to be sponsored by [Frigade](https://frigade.com/?source=
<img alt="Dopt" style="height: 200px; width: 200px;" src="docs/static/img/sponsors/dopt.png" />
</a>

## Powered by

<p>
<a href="https://www.digitalocean.com/?refcode=0813b3be1161&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge">
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg" width="201px">
</a>
</p>

## Usage

1 . Import the CSS file to set default styling.
Expand Down Expand Up @@ -135,14 +143,6 @@ Please check our [troubleshooting section](https://react-tooltip.com/docs/troubl
If you can't find your problem here, make sure there isn't [an open issue](https://github.com/ReactTooltip/react-tooltip/issues) already covering it.
If there isn't, feel free to [submit a new issue](https://github.com/ReactTooltip/react-tooltip/issues/new/choose).

## Powered by

<p>
<a href="https://www.digitalocean.com/?refcode=0813b3be1161&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge">
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PoweredByDO/DO_Powered_by_Badge_blue.svg" width="201px">
</a>
</p>

## Article

[How I insert sass into react component](https://medium.com/@wwayne_me/how-i-insert-sass-into-my-npm-react-component-b46b9811c226#.gi4hxu44a)
Expand Down
2 changes: 1 addition & 1 deletion docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
}
16 changes: 16 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable max-len */
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github')
const darkCodeTheme = require('prism-react-renderer/themes/dracula')
const postcssPresetEnv = require('postcss-preset-env')

/** @return {import('@docusaurus/types').Plugin} */
function customPostCssPlugin() {
return {
name: 'custom-postcss',
configurePostCss(options) {
// Append new PostCSS plugins here.
options.plugins.push(postcssPresetEnv) // allow newest CSS syntax
return options
},
}
}

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand All @@ -29,6 +43,8 @@ const config = {
locales: ['en'],
},

plugins: [customPostCssPlugin],

scripts: [
// {
// src: 'https://securepubads.g.doubleclick.net/tag/js/gpt.js',
Expand Down
5 changes: 3 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.1",
"@docusaurus/core": "2.4.3",
"@docusaurus/preset-classic": "2.4.3",
"@mdx-js/react": "1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
Expand All @@ -28,6 +28,7 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.4.1",
"@tsconfig/docusaurus": "^1.0.5",
"postcss-preset-env": "^9.3.0",
"typescript": "4.9.5"
},
"browserslist": {
Expand Down
Loading

0 comments on commit 56a7ba1

Please sign in to comment.