-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc000e1
commit 78b1206
Showing
7 changed files
with
64 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { useMemo } from 'react' | ||
import { Button } from 'antd' | ||
import { useEnvironment, useTourContext } from '../../contexts' | ||
import classNames from 'classnames' | ||
import './guided-tour.css' | ||
|
||
export const GuidedTourButton = ({ }) => { | ||
const { tour } = useTourContext()! | ||
const { context } = useEnvironment() as any | ||
|
||
return ( | ||
<div className="guided-tour-button-container"> | ||
<Button | ||
className={ classNames("guided-tour-button", context.brand) } | ||
onClick={ () => tour.start() } | ||
> | ||
Take a Tour | ||
</Button> | ||
</div> | ||
) | ||
} |
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,36 @@ | ||
.guided-tour-button-container { | ||
display: flex; | ||
position: fixed; | ||
top: 60%; | ||
right: 0; | ||
z-index: 99; | ||
transform: rotate(-90deg) translateY(-100%); | ||
transform-origin: top right; | ||
} | ||
|
||
button.guided-tour-button { | ||
padding: 8px 32px; | ||
height: 40px; | ||
font-weight: 600; | ||
font-size: 16px; | ||
/* Improves readability when rotated */ | ||
letter-spacing: .8px; | ||
border-bottom-left-radius: 0; | ||
border-bottom-right-radius: 0; | ||
border-bottom-width: 0; | ||
|
||
} | ||
|
||
.guided-tour-button.heal { | ||
background-color: #982465; | ||
color: white; | ||
border-color: #982465; | ||
} | ||
.guided-tour-button.heal:hover { | ||
color: #c41d7f; | ||
border-color: #c41d7f; | ||
} | ||
.guided-tour-button.heal:active, .guided-tour-button.heal:focus { | ||
color: #982465; | ||
border-color: #982465; | ||
} |
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 @@ | ||
export * from './guided-tour-button' |
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