diff --git a/src/core/Avatar/Avatar.test.tsx b/src/core/Avatar/Avatar.test.tsx index bf270d708..677081d91 100644 --- a/src/core/Avatar/Avatar.test.tsx +++ b/src/core/Avatar/Avatar.test.tsx @@ -2,11 +2,10 @@ import React from 'react'; import { render } from '@testing-library/react'; import '@testing-library/jest-dom'; -import { Avatar } from './Avatar'; -import { BootstrapSize } from '../types'; +import { Avatar, AvatarSize } from './Avatar'; describe('Component: Avatar', () => { - function setup({ size }: { size?: BootstrapSize }) { + function setup({ size }: { size?: AvatarSize }) { const { container } = render( void; }; -type ModifiedInputProps = Omit; + | 'className' +>; export type Props = ModifiedInputProps & { /** @@ -45,7 +46,6 @@ export type Props = ModifiedInputProps & { */ label: React.ReactNode; - /** * Optionally whether the label should be invisible (aria-label). * This only works if label is a string. @@ -116,7 +116,7 @@ export type Props = ModifiedInputProps & { /** * Optional size you want to give the icon. */ - size?: BootstrapSize; + size?: InputSize; /** * Whether to show a "clear" button. @@ -126,6 +126,8 @@ export type Props = ModifiedInputProps & { canClear?: boolean; }; +type InputSize = 'sm' | 'md' | 'lg'; + /** * SearchInput is a component which shows an input field which has * the onChange debounced by a number of milliseconds. Useful for @@ -160,7 +162,7 @@ export function SearchInput(props: Props) { // When the onChange changes update the handleChange useEffect(() => { handleChange.current = lodashDebounce(onChange, debounce, debounceSettings); - }, [ onChange, debounce, debounceSettings ]); + }, [onChange, debounce, debounceSettings]); function handleKeyUp(event: KeyboardEvent) { if (event.key === 'Enter') { diff --git a/src/core/types.ts b/src/core/types.ts index 5b9951d77..dcc23e5fa 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -12,7 +12,7 @@ export type Color = | 'dark' | 'light'; -export type BootstrapSize = 'xs' | 'sm' | 'md' | 'lg'; +export type ModalSize = 'sm' | 'md' | 'lg' | 'xl'; type Side = 'top' | 'right' | 'bottom' | 'left'; type StartOrEnd = 'start' | 'end';