Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
rename to defaultIsCollapsed
Browse files Browse the repository at this point in the history
  • Loading branch information
BeirlaenAaron committed Jan 4, 2023
1 parent ff385f5 commit 912e55b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

### Added

- `AdvancedCollapsible`: Added `isCollapsed` prop to be able to set it's state ([@BeirlaenAaron](https://github.com/BeirlaenAaron) in [#2511](https://github.com/teamleadercrm/ui/pull/2511))
- `AdvancedCollapsible`: Added `defaultIsCollapsed` prop to be able to set it's state ([@BeirlaenAaron](https://github.com/BeirlaenAaron) in [#2511](https://github.com/teamleadercrm/ui/pull/2511))

## [18.4.0] - 2023-01-02

Expand Down
6 changes: 3 additions & 3 deletions src/components/advancedCollapsible/AdvancedCollapsible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ export interface AdvancedCollapsibleProps extends Omit<BoxProps, 'size'> {
children: ReactNode;
title: string;
size?: AllowedAdvancedCollapsibleSize;
isCollapsed?: boolean;
defaultIsCollapsed?: boolean;
}

const AdvancedCollapsible: GenericComponent<AdvancedCollapsibleProps> = ({
children,
color = 'teal',
size = 'medium',
title,
isCollapsed = true,
defaultIsCollapsed = true,
...others
}) => {
const [collapsed, setCollapsed] = useState(isCollapsed);
const [collapsed, setCollapsed] = useState(defaultIsCollapsed);

const boxProps = pickBoxProps(others);
const TitleElement = size === 'large' ? Heading3 : TextBody;
Expand Down

0 comments on commit 912e55b

Please sign in to comment.