-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update github timeline demo , add more commands to manage timeline: Remove-TimelineItem, Add-TimelineItem, Clear-Timeline,
- Loading branch information
Showing
127 changed files
with
770 additions
and
334 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react' | ||
import GitHubCalendar from 'react-github-calendar' | ||
import ReactTooltip from 'react-tooltip' | ||
import { useTheme } from 'antd-theme' | ||
|
||
export default function AntdGithubCalendar({ username, color, ...props }) { | ||
const [{ variables }] = useTheme() | ||
return ( | ||
<GitHubCalendar { ...props } color={ color || variables['primary-color'] } username={ username }> | ||
<ReactTooltip delayShow={ 50 } html /> | ||
</GitHubCalendar> | ||
) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
import React from "react"; | ||
import { Popover } from "antd"; | ||
import useDashboardEvent from "../api/Hooks/useDashboardEvent"; | ||
import React from "react" | ||
import { Popover } from "antd" | ||
import useDashboardEvent from "../api/Hooks/useDashboardEvent" | ||
|
||
const AntdPopover = props => { | ||
const [{ content, attributes }] = useDashboardEvent(props.id, props); | ||
const [{ content, attributes }] = useDashboardEvent(props.id, props) | ||
const title = ( | ||
<span> | ||
{attributes.title && UniversalDashboard.renderComponent(attributes.title)} | ||
{ attributes.title && UniversalDashboard.renderComponent(attributes.title) } | ||
</span> | ||
) | ||
|
||
return <Popover | ||
{...attributes} | ||
title={title} | ||
content={UniversalDashboard.renderComponent(content)} | ||
autoAdjustOverflow={true} | ||
> | ||
{attributes.children.map(item => | ||
item.type && UniversalDashboard.renderComponent(item) || item | ||
)} | ||
</Popover> | ||
}; | ||
{ ...attributes } | ||
title={ title } | ||
content={ UniversalDashboard.renderComponent(content) } | ||
autoAdjustOverflow={ true } | ||
> | ||
{ content && UniversalDashboard.renderComponent(children) } | ||
</Popover> | ||
} | ||
|
||
export default AntdPopover; | ||
export default AntdPopover |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react' | ||
import { useMutation, queryCache } from 'react-query' | ||
|
||
export default function useClearTimeline() { | ||
const clearTimeline = ({ timelineId }) => { | ||
queryCache.setQueryData(["timeline", { id: timelineId }], []) | ||
} | ||
return useMutation(clearTimeline) | ||
} |
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
Import-Module $Root\Configuration\AppBar\AppBarMenu.ps1 -Variable * -Force | ||
$AppBar = New-UDAntdAppBar -Visible -Content { $AppBarMenu } | ||
$AppBar = New-UDAntdAppBar -Visible -Content { | ||
$AppBarMenu | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,5 +49,5 @@ New-UDPage -Title 'Forms' -Name 'Form' -Content { | |
duration = 3 | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.