diff --git a/clients/admin-ui/src/features/common/SearchBar.tsx b/clients/admin-ui/src/features/common/SearchBar.tsx index 4e6c4e20c9..752dd8269a 100644 --- a/clients/admin-ui/src/features/common/SearchBar.tsx +++ b/clients/admin-ui/src/features/common/SearchBar.tsx @@ -1,10 +1,8 @@ import { AntButton as Button, - Input, - InputGroup, - InputLeftElement, - InputProps, - InputRightElement, + AntInput as Input, + AntInputProps as InputProps, + AntSpace as Space, SearchLineIcon, } from "fidesui"; @@ -26,32 +24,25 @@ const SearchBar = ({ onChange(event.target.value); return ( - - {withIcon ? ( - - - - ) : null} + : undefined} + className="border-neutral-2" {...props} /> {onClear ? ( - - - + ) : null} - + ); }; diff --git a/clients/admin-ui/src/features/data-discovery-and-detection/SearchInput.tsx b/clients/admin-ui/src/features/data-discovery-and-detection/SearchInput.tsx index 4a251fa9e8..b0891c29c5 100644 --- a/clients/admin-ui/src/features/data-discovery-and-detection/SearchInput.tsx +++ b/clients/admin-ui/src/features/data-discovery-and-detection/SearchInput.tsx @@ -1,6 +1,7 @@ -import { AntButton as Button, AntInput, AntSpace } from "fidesui"; import { debounce } from "lodash"; -import { ChangeEventHandler, useCallback, useState } from "react"; +import { useCallback, useState } from "react"; + +import SearchBar from "~/features/common/SearchBar"; interface SearchInputProps { value: string; @@ -14,10 +15,10 @@ export const SearchInput = ({ value, onChange }: SearchInputProps) => { // Add some delay to prevent fetching on each key pressed while typing const debouncedOnChange = debounce(onChange, INPUT_CHANGE_DELAY); - const handleOnChange: ChangeEventHandler = useCallback( - (e) => { - setCurrentInput(e.currentTarget.value); - debouncedOnChange(e.currentTarget.value); + const handleOnChange = useCallback( + (newValue: string) => { + setCurrentInput(newValue); + debouncedOnChange(newValue); }, // eslint-disable-next-line react-hooks/exhaustive-deps [], @@ -29,16 +30,10 @@ export const SearchInput = ({ value, onChange }: SearchInputProps) => { }; return ( - - - - + ); }; diff --git a/clients/admin-ui/tailwind.config.js b/clients/admin-ui/tailwind.config.js index 902463811b..9e2ec2687b 100644 --- a/clients/admin-ui/tailwind.config.js +++ b/clients/admin-ui/tailwind.config.js @@ -2,7 +2,23 @@ module.exports = { content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"], theme: { - extend: {}, + extend: { + colors: { + // TODO: unify with existing Tailwind "gray" color + neutral: { + 1: "#fafafa", + 2: "#e6e6e8", + 3: "#d1d2d4", + 4: "#bcbec1", + 5: "#a8aaad", + 6: "#93969a", + 7: "#7e8185", + 8: "#696c71", + 9: "#53575c", + 10: "#2b2e35", + }, + }, + }, }, plugins: [], }; diff --git a/clients/fidesui/src/index.ts b/clients/fidesui/src/index.ts index b965af2e91..573ca570dc 100644 --- a/clients/fidesui/src/index.ts +++ b/clients/fidesui/src/index.ts @@ -8,6 +8,7 @@ export * from "@chakra-ui/utils"; export type { ThemeConfig as AntThemeConfig } from "antd/es"; export type { SwitchProps as AntSwitchProps } from "antd/lib"; export type { ButtonProps as AntButtonProps } from "antd/lib"; +export type { InputProps as AntInputProps } from "antd/lib"; export { Layout as AntLayout } from "antd/lib"; export { Space as AntSpace } from "antd/lib"; export { Col as AntCol, Row as AntRow } from "antd/lib";