Skip to content

Commit

Permalink
Merge pull request #103 from mateuszsikora/main
Browse files Browse the repository at this point in the history
Replace classnames with clsx
  • Loading branch information
praveenn77 authored Apr 12, 2023
2 parents c476634 + 07a7350 commit c45117f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
25 changes: 14 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"license": "MIT",
"dependencies": {
"autocomplete.js": "^0.37.0",
"classnames": "^2.2.6",
"clsx": "^1.2.1",
"gauge": "^3.0.0",
"hast-util-select": "^4.0.0",
"hast-util-to-text": "^2.0.0",
Expand Down
6 changes: 3 additions & 3 deletions src/theme/SearchBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import React, { useRef, useCallback, useState } from "react";
import classnames from "classnames";
import clsx from "clsx";
import { useHistory } from "@docusaurus/router";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import { usePluginData } from '@docusaurus/useGlobalData';
Expand Down Expand Up @@ -90,7 +90,7 @@ const Search = props => {
<span
aria-label="expand searchbar"
role="button"
className={classnames("search-icon", {
className={clsx("search-icon", {
"search-icon-hidden": props.isSearchBarExpanded
})}
onClick={toggleSearchIconClick}
Expand All @@ -102,7 +102,7 @@ const Search = props => {
type="search"
placeholder={indexReady ? 'Search' : 'Loading...'}
aria-label="Search"
className={classnames(
className={clsx(
"navbar__search-input",
{ "search-bar-expanded": props.isSearchBarExpanded },
{ "search-bar": !props.isSearchBarExpanded }
Expand Down

0 comments on commit c45117f

Please sign in to comment.