| 1 |
import { Fragment } from 'react'; |
| 2 |
import { |
| 3 |
Banner, |
| 4 |
Card, |
| 5 |
CardBody, |
| 6 |
Flex, |
| 7 |
FlexItem, |
| 8 |
Gallery, |
| 9 |
GalleryItem, |
| 10 |
PageSection, |
| 11 |
Content |
| 12 |
} from '@patternfly/react-core'; |
| 13 |
import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; |
| 14 |
import { css } from '@patternfly/react-styles'; |
| 15 |
import display from '@patternfly/react-styles/css/utilities/Display/display'; |
| 16 |
|
| 17 |
export const BannerTopBottom: React.FunctionComponent = () => ( |
| 18 |
<Fragment> |
| 19 |
<Flex |
| 20 |
direction={{ default: 'column' }} |
| 21 |
flexWrap={{ default: 'nowrap' }} |
| 22 |
spaceItems={{ default: 'spaceItemsNone' }} |
| 23 |
style={{ height: '100%' }} |
| 24 |
> |
| 25 |
<FlexItem> |
| 26 |
<Banner isSticky> |
| 27 |
<Flex |
| 28 |
justifyContent={{ default: 'justifyContentCenter', lg: 'justifyContentSpaceBetween' }} |
| 29 |
flexWrap={{ default: 'nowrap' }} |
| 30 |
> |
| 31 |
<div className={css(display.displayNone, display.displayBlockOnLg)}>Localhost</div> |
| 32 |
<div className={css(display.displayNone, display.displayBlockOnLg)}> |
| 33 |
This message is sticky to the top of the page. |
| 34 |
</div> |
| 35 |
<div className={css(display.displayNoneOnLg)}>Drop some text on mobile, truncate if needed.</div> |
| 36 |
<div className={css(display.displayNone, display.displayBlockOnLg)}>Ned Username</div> |
| 37 |
</Flex> |
| 38 |
</Banner> |
| 39 |
</FlexItem> |
| 40 |
<FlexItem grow={{ default: 'grow' }} style={{ minHeight: 0 }}> |
| 41 |
<DashboardWrapper breadcrumb={null}> |
| 42 |
<PageSection aria-labelledby="main-title"> |
| 43 |
<Content> |
| 44 |
<h1 id="main-title">Main title</h1> |
| 45 |
<p> |
| 46 |
Body text should be Red Hat Text at 1rem (16px). It should have leading of 1.5rem(24px) because <br /> |
| 47 |
of it's relative line height of 1.5. |
| 48 |
</p> |
| 49 |
</Content> |
| 50 |
</PageSection> |
| 51 |
<PageSection aria-label="Cards gallery"> |
| 52 |
<Gallery hasGutter> |
| 53 |
{Array.from({ length: 30 }).map((_value, index) => ( |
| 54 |
<GalleryItem key={index}> |
| 55 |
<Card key={index}> |
| 56 |
<CardBody>This is a card</CardBody> |
| 57 |
</Card> |
| 58 |
</GalleryItem> |
| 59 |
))} |
| 60 |
</Gallery> |
| 61 |
</PageSection> |
| 62 |
</DashboardWrapper> |
| 63 |
</FlexItem> |
| 64 |
<FlexItem> |
| 65 |
<Banner isSticky> |
| 66 |
<Flex |
| 67 |
justifyContent={{ default: 'justifyContentCenter', lg: 'justifyContentSpaceBetween' }} |
| 68 |
flexWrap={{ default: 'nowrap' }} |
| 69 |
> |
| 70 |
<div className={css(display.displayNone, display.displayBlockOnLg)}>Localhost</div> |
| 71 |
<div className={css(display.displayNone, display.displayBlockOnLg)}> |
| 72 |
This message is sticky to the bottom of the page. |
| 73 |
</div> |
| 74 |
<div className={css(display.displayNoneOnLg)}>Drop some text on mobile, truncate if needed.</div> |
| 75 |
<div className={css(display.displayNone, display.displayBlockOnLg)}>Ned Username</div> |
| 76 |
</Flex> |
| 77 |
</Banner> |
| 78 |
</FlexItem> |
| 79 |
</Flex> |
| 80 |
</Fragment> |
| 81 |
); |