generated from gravity-ui/package-example
-
Notifications
You must be signed in to change notification settings - Fork 9
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
e296ed4
commit 69f0b5c
Showing
4 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## OnboardingMenu | ||
|
||
A component for managing [onboarding presets](https://github.com/gravity-ui/onboarding) ([storybook](https://preview.gravity-ui.com/components/?path=/story/components-onboardingmenu--default)). | ||
|
||
## Props | ||
|
||
```ts | ||
type OnboardingMenu = { | ||
/** title of onboarding menu */ | ||
title: React.ReactNode; | ||
/** number of presets passed. Changes the progress bar */ | ||
progress: number; | ||
/** icon of onboarding menu */ | ||
icon?: IconData; | ||
|
||
/** the default component is expand or collapsed */ | ||
defaultExpanded: boolean; | ||
/** menu items*/ | ||
children?: React.ReactNode; | ||
|
||
collapseButtonText?: string; | ||
completeButtonText?: string; | ||
className?: string; | ||
|
||
onExpand?: (expanded: boolean) => void; | ||
onCompleteClick: (event: React.MouseEvent) => void; | ||
onCollapseClick?: (event: React.MouseEvent) => void; | ||
}; | ||
|
||
type OnboardingMenu.ItemProps = { | ||
title: string; | ||
/** affects the item icon */ | ||
status?: 'completed' | 'pending'; | ||
children?: React.ReactNode; | ||
buttons?: React.ReactNode; | ||
/** usually the last element does not need a divider, then you need to pass false */ | ||
hasDivider?: boolean; | ||
loading?: boolean; | ||
}; | ||
|
||
type OnboardingMenu.ItemImage = { | ||
src: string; | ||
alt: string; | ||
}; | ||
|
||
type OnboardingMenu.ItemText = { | ||
src: string; | ||
alt: string; | ||
}; | ||
|
||
``` |
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