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 {
|
export interface TooltipProps extends UnsafeStyleProps {
|
||||||
content: SingleSlot;
|
content: SingleSlot;
|
||||||
fineType?: string;
|
fineType?: string | string[];
|
||||||
children: Slot;
|
children: Slot;
|
||||||
showAfterMs?: number;
|
showAfterMs?: number;
|
||||||
|
|
||||||
@@ -79,9 +79,17 @@ export function Tooltip({
|
|||||||
|
|
||||||
{fineType && (
|
{fineType && (
|
||||||
<div className={css['FineType']}>
|
<div className={css['FineType']}>
|
||||||
<Label size={LabelSize.Small} variant={TextType.Secondary}>
|
{Array.isArray(fineType) ? (
|
||||||
{fineType}
|
fineType.map((x) => (
|
||||||
</Label>
|
<Label size={LabelSize.Small} variant={TextType.Secondary}>
|
||||||
|
{x}
|
||||||
|
</Label>
|
||||||
|
))
|
||||||
|
) : (
|
||||||
|
<Label size={LabelSize.Small} variant={TextType.Secondary}>
|
||||||
|
{fineType}
|
||||||
|
</Label>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</BaseDialog>
|
</BaseDialog>
|
||||||
|
|||||||
@@ -123,7 +123,10 @@ export function CloudServiceCard({
|
|||||||
{isEditorEnvironment && (
|
{isEditorEnvironment && (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content="Open the Parse Dashboard"
|
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}
|
renderDirection={DialogRenderDirection.Below}
|
||||||
>
|
>
|
||||||
<PrimaryButton
|
<PrimaryButton
|
||||||
|
|||||||
Reference in New Issue
Block a user