mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-11 23:02:55 +01:00
feat(editor): Tooltip support multiple fineTypes (#28)
This commit is contained in:
@@ -11,7 +11,7 @@ import css from './Tooltip.module.scss';
|
||||
|
||||
export interface TooltipProps extends UnsafeStyleProps {
|
||||
content: SingleSlot;
|
||||
fineType?: string;
|
||||
fineType?: string | string[];
|
||||
children: Slot;
|
||||
showAfterMs?: number;
|
||||
|
||||
@@ -79,9 +79,17 @@ export function Tooltip({
|
||||
|
||||
{fineType && (
|
||||
<div className={css['FineType']}>
|
||||
{Array.isArray(fineType) ? (
|
||||
fineType.map((x) => (
|
||||
<Label size={LabelSize.Small} variant={TextType.Secondary}>
|
||||
{x}
|
||||
</Label>
|
||||
))
|
||||
) : (
|
||||
<Label size={LabelSize.Small} variant={TextType.Secondary}>
|
||||
{fineType}
|
||||
</Label>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</BaseDialog>
|
||||
|
||||
@@ -123,7 +123,10 @@ export function CloudServiceCard({
|
||||
{isEditorEnvironment && (
|
||||
<Tooltip
|
||||
content="Open the Parse Dashboard"
|
||||
fineType={`${Keybindings.CLOUD_SERVICE_OPEN_DASHBOARD.label} in window or ${Keybindings.CLOUD_SERVICE_OPEN_DASHBOARD_BROWSER.label} to open in browsers`}
|
||||
fineType={[
|
||||
`In Window: ${Keybindings.CLOUD_SERVICE_OPEN_DASHBOARD.label}`,
|
||||
`In Browser: ${Keybindings.CLOUD_SERVICE_OPEN_DASHBOARD_BROWSER.label}`
|
||||
]}
|
||||
renderDirection={DialogRenderDirection.Below}
|
||||
>
|
||||
<PrimaryButton
|
||||
|
||||
Reference in New Issue
Block a user