-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip component #8
base: master
Are you sure you want to change the base?
Conversation
* Tooltip title. Can be optionally used as tooltip children. | ||
*/ | ||
export const TooltipTitle = ({ children }: TooltipTitleProps) => ( | ||
<h1 className={cl['bk-tooltip--title']}>{children}</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think class name bk-tooltip--title
should be bk-tooltip__title
in BEM (https://getbem.com/naming/).
The same goes for bk-tooltip--alert
and bk-tooltip--icon
in the code below.
@@ -26,7 +32,44 @@ export const Tooltip = ({ unstyled = false, ...propsRest }: TooltipProps) => { | |||
bk: true, | |||
[cl['bk-tooltip']]: !unstyled, | |||
'bk-body-text': !unstyled, | |||
[cl['bk-tooltip--size-small']]: size === 'small', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bk-tooltip--size-small
can be bk-tooltip--small
if we follow the same way as different components like bk-spinner--small
or bk-link--small
format.
<h1 className={cl['bk-tooltip--title']}>{children}</h1> | ||
); | ||
|
||
export type TooltipItemProps = React.PropsWithChildren<ComponentProps<'h1'> & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ComponentProps<'h1'>
should be ComponentProps<'p'>
as TooltipItem
has p
element?
No description provided.