Skip to content

Commit

Permalink
fix(src/components/navbar): change default <Navbar.Toggle/> icon (#…
Browse files Browse the repository at this point in the history
…819)

* chore(package.json): upgrade `react-icons` -> `4.10.1`

* fix(src/components/navbar): change default `<Navbar.Toggle/>` icon

fixes #818

* chore(vitest.config.ts): fix `vitest` config typing error

This is an annoying common problem with configuring `vitest`. See
https://stackoverflow.com/questions/72146352/vitest-defineconfig-test-does-not-exist-in-type-userconfigexport/73106019#73106019

* chore(package.json): migrate `vitest` coverage provider

see vitest-dev/vitest#3339
  • Loading branch information
tulup-conner authored Jun 22, 2023
1 parent fe477e2 commit 9fa83d2
Show file tree
Hide file tree
Showing 4 changed files with 1,139 additions and 737 deletions.
88 changes: 44 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,64 +54,64 @@
}
},
"dependencies": {
"@floating-ui/react": "^0.24.1",
"flowbite": "^1.6.5",
"react-icons": "^4.8.0",
"@floating-ui/react": "^0.24.3",
"flowbite": "^1.6.6",
"react-icons": "^4.10.1",
"react-indiana-drag-scroll": "^2.2.0",
"tailwind-merge": "^1.13.1"
"tailwind-merge": "^1.13.2"
},
"devDependencies": {
"@mdx-js/loader": "^2.3.0",
"@next/mdx": "^13.4.3",
"@storybook/addon-a11y": "^7.0.17",
"@storybook/addon-actions": "^7.0.17",
"@storybook/addon-docs": "^7.0.17",
"@storybook/addon-essentials": "^7.0.17",
"@storybook/addon-interactions": "^7.0.17",
"@storybook/addon-links": "^7.0.17",
"@storybook/addon-mdx-gfm": "^7.0.17",
"@next/mdx": "^13.4.7",
"@storybook/addon-a11y": "^7.0.23",
"@storybook/addon-actions": "^7.0.23",
"@storybook/addon-docs": "^7.0.23",
"@storybook/addon-essentials": "^7.0.23",
"@storybook/addon-interactions": "^7.0.23",
"@storybook/addon-links": "^7.0.23",
"@storybook/addon-mdx-gfm": "^7.0.23",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/addon-styling": "^1.0.8",
"@storybook/addons": "^7.0.17",
"@storybook/api": "^7.0.17",
"@storybook/blocks": "^7.0.17",
"@storybook/builder-vite": "^7.0.17",
"@storybook/components": "^7.0.17",
"@storybook/core-events": "^7.0.17",
"@storybook/nextjs": "^7.0.17",
"@storybook/react": "^7.0.17",
"@storybook/testing-library": "^0.1.0",
"@storybook/theming": "^7.0.17",
"@testing-library/dom": "^9.3.0",
"@storybook/addon-styling": "^1.3.0",
"@storybook/addons": "^7.0.23",
"@storybook/api": "^7.0.23",
"@storybook/blocks": "^7.0.23",
"@storybook/builder-vite": "^7.0.23",
"@storybook/components": "^7.0.23",
"@storybook/core-events": "^7.0.23",
"@storybook/nextjs": "^7.0.23",
"@storybook/react": "^7.0.23",
"@storybook/testing-library": "^0.2.0",
"@storybook/theming": "^7.0.23",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/node": "^20.2.3",
"@types/node": "^20.3.1",
"@types/prismjs": "^1.26.0",
"@types/react": "^18.2.7",
"@types/react-dom": "^18.2.4",
"@types/react-syntax-highlighter": "^15.5.6",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"@vitejs/plugin-react": "^4.0.0",
"@vitest/coverage-c8": "^0.31.1",
"@vitest/ui": "^0.31.1",
"@types/react": "^18.2.13",
"@types/react-dom": "^18.2.6",
"@types/react-syntax-highlighter": "^15.5.7",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"@vitejs/plugin-react": "^4.0.1",
"@vitest/coverage-v8": "^0.32.2",
"@vitest/ui": "^0.32.2",
"autoprefixer": "^10.4.14",
"axe-core": "^4.7.1",
"axe-core": "^4.7.2",
"commitizen": "^4.3.0",
"cypress": "^12.13.0",
"cypress": "^12.15.0",
"cypress-axe": "^1.4.0",
"cz-conventional-changelog": "3.3.0",
"eslint": "^8.41.0",
"eslint-config-next": "^13.4.3",
"eslint": "^8.43.0",
"eslint-config-next": "^13.4.7",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.6.12",
"fathom-client": "^3.5.0",
"jsdom": "^22.0.0",
"next": "^13.4.4",
"postcss": "^8.4.23",
"jsdom": "^22.1.0",
"next": "^13.4.7",
"postcss": "^8.4.24",
"prettier": "^2.8.8",
"prettier-plugin-organize-imports": "^3.2.2",
"prettier-plugin-tailwindcss": "^0.3.0",
Expand All @@ -124,15 +124,15 @@
"resize-observer-polyfill": "^1.5.1",
"standard-version": "^9.5.0",
"start-server-and-test": "^2.0.0",
"storybook": "^7.0.17",
"storybook": "^7.0.23",
"storybook-dark-mode": "^3.0.0",
"tailwindcss": "^3.3.2",
"terser-webpack-plugin": "^5.3.9",
"tsconfig-paths-webpack-plugin": "^4.0.1",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"typescript": "^5.1.3",
"vite": "^4.3.9",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^0.31.1"
"vitest": "^0.32.2"
},
"peerDependencies": {
"react": "^18",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Navbar/NavbarToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ComponentProps, FC } from 'react';
import { GoThreeBars } from 'react-icons/go';
import { FaBars } from 'react-icons/fa';
import { twMerge } from 'tailwind-merge';
import type { DeepPartial } from '../../';
import { useTheme } from '../../';
Expand All @@ -17,7 +17,7 @@ export interface NavbarToggleProps extends ComponentProps<'button'> {
}

export const NavbarToggle: FC<NavbarToggleProps> = ({
barIcon: BarIcon = GoThreeBars,
barIcon: BarIcon = FaBars,
className,
theme: customTheme = {},
...props
Expand Down
14 changes: 8 additions & 6 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// <reference types="vitest" />
/// <reference types="vite/client" />

import react from '@vitejs/plugin-react';
import type { UserConfig } from 'vite';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import type { InlineConfig } from 'vitest';

type ViteConfig = UserConfig & { test: InlineConfig };

// https://vitejs.dev/config/
export default defineConfig({
const config: ViteConfig = {
build: {
sourcemap: true,
},
Expand All @@ -20,4 +20,6 @@ export default defineConfig({
globals: true,
setupFiles: './src/setup-tests.ts',
},
});
};

export default defineConfig(config);
Loading

0 comments on commit 9fa83d2

Please sign in to comment.