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.
fix(OnboardingMenu): add re-export and docs (#166)
- Loading branch information
1 parent
e296ed4
commit 84df613
Showing
4 changed files
with
53 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
* @amje @ValeraS @korvin89 | ||
/src/components/AdaptiveTabs @artemipanchuk | ||
/src/components/DefinitionList @Raubzeug | ||
/src/components/FilePreview @KirillDyachkovskiy | ||
/src/components/FormRow @ogonkov | ||
/src/components/HelpPopover @Raubzeug | ||
/src/components/OnboardingMenu @nikita-jpg | ||
/src/components/PlaceholderContainer @Marginy605 | ||
/src/components/PromoSheet @Avol-V | ||
/src/components/SharePopover @niktverd | ||
/src/components/StoreBadge @NikitaCG | ||
/src/components/Stories @darkgenius | ||
/src/components/AdaptiveTabs @artemipanchuk | ||
|
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,49 @@ | ||
## 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 OnboardingMenuProps = { | ||
/** 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 OnboardingMenuItemProps = { | ||
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 OnboardingMenuItemImageProps = { | ||
src: string; | ||
alt: string; | ||
}; | ||
|
||
type OnboardingMenuItemTextProps = { | ||
text: 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