Skip to content

Commit

Permalink
readme + examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Eitan Elbaz committed Jun 27, 2023
1 parent 1816915 commit f5a41f7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ export type ComponentVisibility = {
selector: '#my-step-id',
anchorSelector: '#my-step-id-parent',
content: 'Some Content',

// this can only be set on a step
// hide the see through window which wraps around your step's focused html element
// setting this to true will display a backdrop covering your entire screen
hideStepElementHighlight: false,
},
]}
>
Expand Down
9 changes: 9 additions & 0 deletions playground/src/pages/HiddenComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ const HiddenComponents = () => (
pt={2}
pb={8}
>
<Box
id="middle"
position="absolute"
top="50%"
left="50%"
height={0}
width={0}
bgcolor="red"
/>
<Hero />
<KitchenSink />
</Box>
Expand Down
9 changes: 5 additions & 4 deletions playground/src/tours/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ export const HiddenComponentsTour: ReactGrandTourStep[] = [
// component: Hello,
// },
{
selector: `#${HomeStepIds.one}`,
content: "Welcome to React Grand Tour! I'm hiding the current step label on this step.",
preferredModalPosition: 'bottom',
hideCurrentStepLabel: true,
selector: `#middle`,
content:
"Welcome to React Grand Tour! I'm hiding the current step label on this step. This is an example of how to show the backdrop instead of focusing on an element.",
preferredModalPosition: 'auto',
hideStepElementHighlight: true,
},
{
selector: `#${HomeStepIds.two}`,
Expand Down

0 comments on commit f5a41f7

Please sign in to comment.