|
| 1 | +import { createCell, Fragment } from 'web-cell'; |
| 2 | +import classNames from 'classnames'; |
| 3 | + |
| 4 | +import { NavBar } from 'boot-cell/source/Navigator/NavBar'; |
| 5 | +import { Nav } from 'boot-cell/source/Navigator/Nav'; |
| 6 | +import { Form } from 'boot-cell/source/Form/Form'; |
| 7 | +import { Field } from 'boot-cell/source/Form/Field'; |
| 8 | +import { Button } from 'boot-cell/source/Form/Button'; |
| 9 | +import { Badge } from 'boot-cell/source/Reminder/Badge'; |
| 10 | +import { MediaObject } from 'boot-cell/source/Content/MediaObject'; |
| 11 | + |
| 12 | +import style from './Offcanvas.less'; |
| 13 | + |
| 14 | +export function OffcanvasPage() { |
| 15 | + return ( |
| 16 | + <Fragment> |
| 17 | + <NavBar |
| 18 | + offcanvas |
| 19 | + brand="Offcanvas navbar" |
| 20 | + menu={[ |
| 21 | + { title: 'Dashboard' }, |
| 22 | + { title: 'Notifications' }, |
| 23 | + { title: 'Profile' }, |
| 24 | + { title: 'Switch account' }, |
| 25 | + { |
| 26 | + title: 'Settings', |
| 27 | + list: [ |
| 28 | + { title: 'Action' }, |
| 29 | + { title: 'Another action' }, |
| 30 | + { title: 'Something else here' } |
| 31 | + ] |
| 32 | + } |
| 33 | + ]} |
| 34 | + > |
| 35 | + <Form inline className="my-2 my-lg-0"> |
| 36 | + <Field |
| 37 | + type="search" |
| 38 | + className="mr-sm-2" |
| 39 | + placeholder="Search" |
| 40 | + aria-label="Search" |
| 41 | + /> |
| 42 | + <Button |
| 43 | + type="submit" |
| 44 | + kind="success" |
| 45 | + outline |
| 46 | + className="my-2 my-sm-0" |
| 47 | + > |
| 48 | + Search |
| 49 | + </Button> |
| 50 | + </Form> |
| 51 | + </NavBar> |
| 52 | + <Nav |
| 53 | + scrollable |
| 54 | + list={[ |
| 55 | + { title: 'Dashboard' }, |
| 56 | + { |
| 57 | + title: ( |
| 58 | + <Fragment> |
| 59 | + Friends{' '} |
| 60 | + <Badge |
| 61 | + pill |
| 62 | + kind="light" |
| 63 | + className="align-text-bottom" |
| 64 | + > |
| 65 | + 27 |
| 66 | + </Badge> |
| 67 | + </Fragment> |
| 68 | + ) |
| 69 | + }, |
| 70 | + { title: 'Explore' }, |
| 71 | + { title: 'Suggestions' }, |
| 72 | + ...Array.from(new Array(5), () => ({ title: 'Link' })) |
| 73 | + ]} |
| 74 | + /> |
| 75 | + <main className="container"> |
| 76 | + <div |
| 77 | + className={classNames( |
| 78 | + 'd-flex', |
| 79 | + 'align-items-center', |
| 80 | + 'p-3', |
| 81 | + 'my-3', |
| 82 | + style['text-white-50'], |
| 83 | + style['bg-purple'], |
| 84 | + 'rounded', |
| 85 | + 'shadow-sm' |
| 86 | + )} |
| 87 | + > |
| 88 | + <img |
| 89 | + className={classNames('mr-3', style.logo)} |
| 90 | + src="https://web-cell.dev/WebCell-0.f1ffd28b.png" |
| 91 | + /> |
| 92 | + <div className={style['lh-100']}> |
| 93 | + <h6 |
| 94 | + className={classNames( |
| 95 | + 'mb-0', |
| 96 | + 'text-white', |
| 97 | + style['lh-100'] |
| 98 | + )} |
| 99 | + > |
| 100 | + BootCell |
| 101 | + </h6> |
| 102 | + <small>Since 2019</small> |
| 103 | + </div> |
| 104 | + </div> |
| 105 | + <div class="my-3 p-3 bg-white rounded shadow-sm"> |
| 106 | + <h6 class="border-bottom border-gray pb-2 mb-0"> |
| 107 | + Recent updates |
| 108 | + </h6> |
| 109 | + {Array.from(new Array(3), () => ( |
| 110 | + <MediaObject |
| 111 | + className="text-muted pt-3" |
| 112 | + image="https://web-cell.dev/WebCell-0.f1ffd28b.png" |
| 113 | + title="WebCell" |
| 114 | + > |
| 115 | + <p |
| 116 | + className={classNames( |
| 117 | + 'pb-3', |
| 118 | + 'mb-0', |
| 119 | + 'small', |
| 120 | + style['lh-125'], |
| 121 | + 'border-bottom' |
| 122 | + )} |
| 123 | + > |
| 124 | + <strong class="d-block">@TechQuery</strong> |
| 125 | + Web Components engine based on JSX & |
| 126 | + TypeScript |
| 127 | + </p> |
| 128 | + </MediaObject> |
| 129 | + ))} |
| 130 | + <small className="d-block text-right mt-3"> |
| 131 | + <a href="#">All updates</a> |
| 132 | + </small> |
| 133 | + </div> |
| 134 | + <div class="my-3 p-3 bg-white rounded shadow-sm"> |
| 135 | + <h6 class="border-bottom border-gray pb-2 mb-0"> |
| 136 | + Suggestions |
| 137 | + </h6> |
| 138 | + {Array.from(new Array(3), () => ( |
| 139 | + <MediaObject |
| 140 | + className="text-muted pt-3" |
| 141 | + image="https://web-cell.dev/WebCell-0.f1ffd28b.png" |
| 142 | + title="" |
| 143 | + > |
| 144 | + <div |
| 145 | + className={classNames( |
| 146 | + 'pb-3', |
| 147 | + 'mb-0', |
| 148 | + 'small', |
| 149 | + style['lh-125'], |
| 150 | + 'border-bottom' |
| 151 | + )} |
| 152 | + > |
| 153 | + <div class="d-flex justify-content-between align-items-center w-100"> |
| 154 | + <strong>Full Name</strong> |
| 155 | + <a href="#">Follow</a> |
| 156 | + </div> |
| 157 | + <span class="d-block">@username</span> |
| 158 | + </div> |
| 159 | + </MediaObject> |
| 160 | + ))} |
| 161 | + <small className="d-block text-right mt-3"> |
| 162 | + <a href="#">All suggestions</a> |
| 163 | + </small> |
| 164 | + </div> |
| 165 | + </main> |
| 166 | + </Fragment> |
| 167 | + ); |
| 168 | +} |
0 commit comments