Skip to content

Commit

Permalink
feat(Onboarding Menu): defaultExpanded in OnboardingMenuItem (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-jpg authored Apr 8, 2024
1 parent 9699b27 commit 57987ad
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 57987ad

Please sign in to comment.