Skip to content

Commit

Permalink
feat(Onboarding Menu): defaultExpanded in OnboardingMenuItem
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-jpg committed Apr 8, 2024
1 parent 9699b27 commit d95aa10
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/OnboardingMenu/OnboardingMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ $block: '.#{variables.$ns}onboarding-menu';
border: none;
cursor: pointer;
width: 100%;
color: var(--g-color-text-brand-contrast);

padding: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ $block: '.#{variables.$ns}onboarding-menu-item';
background-color: transparent;
border: none;
padding: 0;
color: var(--g-color-text-primary);
}

&__title {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import './OnboardingMenuItem.scss';
export type OnboardingMenuItemProps = {
title: string;
status?: 'completed' | 'pending';
defaultExpanded?: boolean;
children?: React.ReactNode;
buttons?: React.ReactNode;
hasDivider?: boolean;
Expand All @@ -24,6 +25,7 @@ export const OnboardingMenuItem = ({
title,
status,
children,
defaultExpanded,
buttons,
hasDivider = true,
loading = false,
Expand Down Expand Up @@ -66,7 +68,11 @@ export const OnboardingMenuItem = ({
);

const header = children ? (
<Disclosure size="l" className={cnOnboardingMenuItem('title-header')}>
<Disclosure
size="l"
className={cnOnboardingMenuItem('title-header')}
defaultExpanded={defaultExpanded}
>
<Disclosure.Summary>
{(props) => (
<button {...props} className={cnOnboardingMenuItem('title-summary')}>
Expand Down

0 comments on commit d95aa10

Please sign in to comment.