Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/compass-components/src/components/leafygreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ import LeafyGreenTextInput from '@leafygreen-ui/text-input';
import { SearchInput } from '@leafygreen-ui/search-input';
export { usePrevious, useMergeRefs } from '@leafygreen-ui/hooks';
import Toggle from '@leafygreen-ui/toggle';
import Tooltip from '@leafygreen-ui/tooltip';
import LGTooltip from '@leafygreen-ui/tooltip';
import {
H1,
H2,
Expand All @@ -92,8 +92,12 @@ import {
ComboboxOption,
ComboboxGroup,
} from '@leafygreen-ui/combobox';
import { withStackedComponentStyles } from '../hooks/use-stacked-component';



// 2. Wrap and make any changes/workaround to leafygreen components.
const Tooltip = withStackedComponentStyles(LGTooltip);
const Icon = ({
size,
...rest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ type StackedComponentProps<T extends boolean> = T extends true

// TODO(LG-4109): This should be eventually supported by the LG design system
export const withStackedComponentStyles = function <ComponentProps>(
WrappedComponent: ComponentType<ComponentProps>
): ComponentType<ComponentProps> {
WrappedComponent: React.FC<ComponentProps>
): React.FC<ComponentProps> {
const ComponentWithStackedStyles = (
props: ComponentProps,
ref: ForwardedRef<ComponentType<ComponentProps>>
Expand Down
Loading