-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Collapse): add horizontal animation (#5993)
* fix: changed .modal-backdrop to .offcanvas-backdrop * Removed modalBsPrefix in Offcanvas * feat: Added Horizontal Collapse * Added width transition to Collapse API
- Loading branch information
Showing
4 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
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,28 @@ | ||
function Example() { | ||
const [open, setOpen] = useState(false); | ||
|
||
return ( | ||
<> | ||
<Button | ||
onClick={() => setOpen(!open)} | ||
aria-controls="example-collapse-text" | ||
aria-expanded={open} | ||
> | ||
click | ||
</Button> | ||
<div style={{minHeight: '150px'}}> | ||
<Collapse in={open} dimension="width"> | ||
<div id="example-collapse-text"> | ||
<Card body style={{width: '400px'}}> | ||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus | ||
terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer | ||
labore wes anderson cred nesciunt sapiente ea proident. | ||
</Card> | ||
</div> | ||
</Collapse> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
render(<Example />); |
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