-
Notifications
You must be signed in to change notification settings - Fork 840
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Fix broken sticky bottom bar demo
- Loading branch information
Showing
1 changed file
with
7 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
import React from 'react'; | ||
|
||
import { EuiBottomBar, EuiSpacer, EuiText } from '../../../../src/components'; | ||
import { EuiBottomBar, EuiText } from '../../../../src/components'; | ||
|
||
export default () => { | ||
return ( | ||
<> | ||
<div css={{ overflow: 'auto', blockSize: 200 }}> | ||
<EuiText> | ||
<p> | ||
When scrolling past this example block, the{' '} | ||
<strong>EuiBottomBar</strong> will stick to the bottom of the browser | ||
window (with a 10px offset), but keeps it within the bounds of its | ||
parent. | ||
When scrolling within this example, the <strong>EuiBottomBar</strong>{' '} | ||
will stick to the bottom of scrollable container (with a 10px offset), | ||
but will not scroll with the page itself. | ||
</p> | ||
</EuiText> | ||
<EuiSpacer size="xl" /> | ||
<EuiSpacer size="xl" /> | ||
<div css={{ blockSize: 400 }} /> | ||
<EuiBottomBar position="sticky" bottom={10}> | ||
<EuiText textAlign="center"> | ||
<p>Scroll to see!</p> | ||
</EuiText> | ||
</EuiBottomBar> | ||
</> | ||
</div> | ||
); | ||
}; |