-
Notifications
You must be signed in to change notification settings - Fork 231
Expand file tree
/
Copy pathindex.tsx
More file actions
24 lines (20 loc) · 901 Bytes
/
index.tsx
File metadata and controls
24 lines (20 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
'use client';
import React from 'react';
import useBaseComponent from '../internal/hooks/use-base-component';
import { applyDisplayName } from '../internal/utils/apply-display-name';
import { getExternalProps } from '../internal/utils/external-props';
import { TooltipProps } from './interfaces';
import InternalTooltip from './internal';
export { TooltipProps };
export default function Tooltip({ position = 'top', triggerVariant, ...rest }: TooltipProps) {
const baseComponentProps = useBaseComponent('Tooltip', {
props: { position, triggerVariant },
});
const externalProps = getExternalProps(rest);
return (
<InternalTooltip position={position} triggerVariant={triggerVariant} {...externalProps} {...baseComponentProps} />
);
}
applyDisplayName(Tooltip, 'Tooltip');