-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flag aggregated APIkeys in ApiKeys list
- Loading branch information
1 parent
0f24d1d
commit 32accf1
Showing
11 changed files
with
97 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 20 additions & 8 deletions
28
daikoku/javascript/src/components/utils/BeautifulTitle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
import React from 'react'; | ||
import {Tooltip as ReactToolTip} from 'react-tooltip'; | ||
import React, { Children, PropsWithChildren } from 'react'; | ||
import { PlacesType, Tooltip as ReactToolTip, VariantType } from 'react-tooltip'; | ||
import { nanoid } from 'nanoid'; | ||
|
||
type BeautifulTitleProps = { | ||
title: string, | ||
place?: PlacesType, | ||
variant?: VariantType, | ||
className?: string, | ||
style?: object | ||
html?: boolean | ||
} | ||
|
||
export const BeautifulTitle = ({ | ||
title, | ||
children, | ||
html, | ||
place, | ||
variant, | ||
...props | ||
}: any) => { | ||
}: PropsWithChildren<BeautifulTitleProps>) => { | ||
const id: string = nanoid(4); | ||
return ( | ||
<> | ||
<ReactToolTip className='bf-tooltip' anchorId={`tooltip-${id}`} place={place || 'bottom'} variant={variant || 'dark'}/> | ||
<span id={`tooltip-${id}`} {...props} data-tooltip-content={title}> | ||
{children} | ||
</span> | ||
<ReactToolTip className='bf-tooltip' anchorId={`tooltip-${id}`} place={place || 'bottom'} variant={variant || 'dark'} /> | ||
{!html && <span id={`tooltip-${id}`} {...props} data-tooltip-content={title} > | ||
{props.children} | ||
</span>} | ||
{html && <span id={`tooltip-${id}`} {...props} data-tooltip-html={title} > | ||
{props.children} | ||
</span>} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters