1 | import * as React from 'react';
|
2 | import {
|
3 | Alert,
|
4 | UncontrolledAlert,
|
5 | Badge,
|
6 | Breadcrumb,
|
7 | BreadcrumbItem,
|
8 | Button,
|
9 | ButtonDropdown,
|
10 | ButtonGroup,
|
11 | ButtonToggle,
|
12 | ButtonToolbar,
|
13 | Dropdown,
|
14 | DropdownItem,
|
15 | DropdownMenu,
|
16 | DropdownToggle,
|
17 | Card,
|
18 | CardBody,
|
19 | CardColumns,
|
20 | CardDeck,
|
21 | CardFooter,
|
22 | CardGroup,
|
23 | CardHeader,
|
24 | CardImg,
|
25 | CardImgOverlay,
|
26 | CardLink,
|
27 | CardSubtitle,
|
28 | CardText,
|
29 | CardTitle,
|
30 | Carousel,
|
31 | CarouselCaption,
|
32 | CarouselControl,
|
33 | CarouselItem,
|
34 | CarouselIndicators,
|
35 | Row,
|
36 | Col,
|
37 | Container,
|
38 | Collapse,
|
39 | Fade,
|
40 | Form,
|
41 | FormFeedback,
|
42 | FormGroup,
|
43 | FormText,
|
44 | Input,
|
45 | InputGroup,
|
46 | InputGroupText,
|
47 | Pagination,
|
48 | Label,
|
49 | ListGroup,
|
50 | ListGroupItem,
|
51 | ListGroupItemHeading,
|
52 | ListGroupItemText,
|
53 | List,
|
54 | ListInlineItem,
|
55 | ModalFooter,
|
56 | Modal,
|
57 | ModalBody,
|
58 | ModalHeader,
|
59 | Media,
|
60 | Nav,
|
61 | Navbar,
|
62 | NavbarBrand,
|
63 | NavbarText,
|
64 | NavbarToggler,
|
65 | NavItem,
|
66 | NavLink,
|
67 | PaginationItem,
|
68 | PaginationLink,
|
69 | Popover,
|
70 | PopoverBody,
|
71 | PopoverHeader,
|
72 | Progress,
|
73 | TabPane,
|
74 | UncontrolledButtonDropdown,
|
75 | UncontrolledDropdown,
|
76 | UncontrolledTooltip,
|
77 | UncontrolledCollapse,
|
78 | UncontrolledCarousel,
|
79 | TabContent,
|
80 | Table,
|
81 | Tag,
|
82 | Toast,
|
83 | ToastBody,
|
84 | ToastHeader,
|
85 | Tooltip,
|
86 | Spinner,
|
87 | UncontrolledPopover,
|
88 | Util,
|
89 | } from 'reactstrap';
|
90 |
|
91 |
|
92 | const Examplea = (props: any) => {
|
93 | return (
|
94 | <div>
|
95 | <Alert
|
96 | color="success"
|
97 | closeClassName="close"
|
98 | closeAriaLabel="close"
|
99 | fade={false}
|
100 | innerRef={React.createRef()}
|
101 | >
|
102 | <strong>Well done!</strong> You successfully read this important alert
|
103 | message.
|
104 | </Alert>
|
105 | <Alert color="info">
|
106 | <strong>Heads up!</strong> This alert needs your attention, but it's not
|
107 | super important.
|
108 | </Alert>
|
109 | <Alert color="warning">
|
110 | <strong>Warning!</strong> Better check yourself, you're not looking too
|
111 | good.
|
112 | </Alert>
|
113 | <Alert color="danger">
|
114 | <strong>Oh snap!</strong> Change a few things up and try submitting
|
115 | again.
|
116 | </Alert>
|
117 | </div>
|
118 | );
|
119 | };
|
120 |
|
121 | class AlertExample extends React.Component<any, any> {
|
122 | state: any;
|
123 | constructor(props: any) {
|
124 | super(props);
|
125 |
|
126 | this.state = {
|
127 | visible: true,
|
128 | };
|
129 | }
|
130 |
|
131 | onDismiss = () => {
|
132 | this.setState({ visible: false });
|
133 | };
|
134 |
|
135 | render() {
|
136 | return (
|
137 | <Alert color="info" isOpen={this.state.visible} toggle={this.onDismiss}>
|
138 | I am an alert and I can be dismissed!
|
139 | </Alert>
|
140 | );
|
141 | }
|
142 | }
|
143 |
|
144 | function AlertExample1() {
|
145 | return (
|
146 | <UncontrolledAlert color="info">
|
147 | I am an alert and I can be dismissed!
|
148 | </UncontrolledAlert>
|
149 | );
|
150 | }
|
151 |
|
152 |
|
153 | class Example2 extends React.Component {
|
154 | render() {
|
155 | return (
|
156 | <div>
|
157 | <h1>
|
158 | Heading <Badge>New</Badge>
|
159 | </h1>
|
160 | <h2>
|
161 | Heading <Badge>New</Badge>
|
162 | </h2>
|
163 | <h3>
|
164 | Heading <Badge>New</Badge>
|
165 | </h3>
|
166 | <h4>
|
167 | Heading <Badge>New</Badge>
|
168 | </h4>
|
169 | <h5>
|
170 | Heading <Badge>New</Badge>
|
171 | </h5>
|
172 | <h6>
|
173 | Heading <Badge>New</Badge>
|
174 | </h6>
|
175 | </div>
|
176 | );
|
177 | }
|
178 | }
|
179 |
|
180 | export class Example3 extends React.Component {
|
181 | render() {
|
182 | return (
|
183 | <div>
|
184 | <Badge>default</Badge>
|
185 | <Badge color="primary">primary</Badge>
|
186 | <Badge color="success">success</Badge>
|
187 | <Badge color="info">info</Badge>
|
188 | <Badge color="warning">warning</Badge>
|
189 | <Badge color="danger">danger</Badge>
|
190 | </div>
|
191 | );
|
192 | }
|
193 | }
|
194 |
|
195 | class Example4 extends React.Component {
|
196 | render() {
|
197 | return (
|
198 | <div>
|
199 | <Badge color="default" pill>
|
200 | default
|
201 | </Badge>{' '}
|
202 | <Badge color="primary" pill>
|
203 | primary
|
204 | </Badge>{' '}
|
205 | <Badge color="success" pill>
|
206 | success
|
207 | </Badge>{' '}
|
208 | <Badge color="info" pill>
|
209 | info
|
210 | </Badge>{' '}
|
211 | <Badge color="warning" pill>
|
212 | warning
|
213 | </Badge>{' '}
|
214 | <Badge color="danger" pill>
|
215 | danger
|
216 | </Badge>
|
217 | </div>
|
218 | );
|
219 | }
|
220 | }
|
221 |
|
222 |
|
223 | const Example5 = (props: any) => {
|
224 | return (
|
225 | <div>
|
226 | <Breadcrumb>
|
227 | <BreadcrumbItem active>Home</BreadcrumbItem>
|
228 | </Breadcrumb>
|
229 | <Breadcrumb>
|
230 | <BreadcrumbItem>
|
231 | <a href="#">Home</a>
|
232 | </BreadcrumbItem>
|
233 | <BreadcrumbItem active>Library</BreadcrumbItem>
|
234 | </Breadcrumb>
|
235 | <Breadcrumb>
|
236 | <BreadcrumbItem>
|
237 | <a href="#">Home</a>
|
238 | </BreadcrumbItem>
|
239 | <BreadcrumbItem>
|
240 | <a href="#">Library</a>
|
241 | </BreadcrumbItem>
|
242 | <BreadcrumbItem active>Data</BreadcrumbItem>
|
243 | </Breadcrumb>
|
244 | </div>
|
245 | );
|
246 | };
|
247 |
|
248 | const Example6 = (props: any) => {
|
249 | return (
|
250 | <div>
|
251 | <Breadcrumb tag="nav">
|
252 | <BreadcrumbItem tag="a" href="#">
|
253 | Home
|
254 | </BreadcrumbItem>
|
255 | <BreadcrumbItem tag="a" href="#">
|
256 | Library
|
257 | </BreadcrumbItem>
|
258 | <BreadcrumbItem tag="a" href="#">
|
259 | Data
|
260 | </BreadcrumbItem>
|
261 | <BreadcrumbItem active tag="span">
|
262 | Bootstrap
|
263 | </BreadcrumbItem>
|
264 | </Breadcrumb>
|
265 | </div>
|
266 | );
|
267 | };
|
268 |
|
269 |
|
270 | class Example7 extends React.Component {
|
271 | render() {
|
272 | return (
|
273 | <div>
|
274 | <Button color="primary">primary</Button>{' '}
|
275 | <Button color="secondary">secondary</Button>{' '}
|
276 | <Button color="success">success</Button>{' '}
|
277 | <Button color="info">info</Button>{' '}
|
278 | <Button color="warning">warning</Button>{' '}
|
279 | <Button color="danger">danger</Button>{' '}
|
280 | <Button color="link">link</Button>
|
281 | </div>
|
282 | );
|
283 | }
|
284 | }
|
285 |
|
286 | class Example8 extends React.Component {
|
287 | render() {
|
288 | return (
|
289 | <div>
|
290 | <Button outline color="primary">
|
291 | primary
|
292 | </Button>{' '}
|
293 | <Button outline color="secondary">
|
294 | secondary
|
295 | </Button>{' '}
|
296 | <Button outline color="success">
|
297 | success
|
298 | </Button>{' '}
|
299 | <Button outline color="info">
|
300 | info
|
301 | </Button>{' '}
|
302 | <Button outline color="warning">
|
303 | warning
|
304 | </Button>{' '}
|
305 | <Button outline color="danger">
|
306 | danger
|
307 | </Button>
|
308 | </div>
|
309 | );
|
310 | }
|
311 | }
|
312 |
|
313 | const Example9 = (
|
314 | <div>
|
315 | <Button color="primary" size="lg">
|
316 | Large Button
|
317 | </Button>{' '}
|
318 | <Button color="secondary" size="lg">
|
319 | Large Button
|
320 | </Button>
|
321 | </div>
|
322 | );
|
323 |
|
324 | const Example10 = (
|
325 | <div>
|
326 | <Button color="primary" size="sm">
|
327 | Small Button
|
328 | </Button>{' '}
|
329 | <Button color="secondary" size="sm">
|
330 | Small Button
|
331 | </Button>
|
332 | </div>
|
333 | );
|
334 |
|
335 | const Example11 = (
|
336 | <div>
|
337 | <Button color="primary" size="lg" block>
|
338 | Block level button
|
339 | </Button>
|
340 | <Button color="secondary" size="lg" block>
|
341 | Block level button
|
342 | </Button>
|
343 | </div>
|
344 | );
|
345 |
|
346 | const Example12 = (
|
347 | <div>
|
348 | <Button color="primary" size="lg" active>
|
349 | Primary link
|
350 | </Button>{' '}
|
351 | <Button color="secondary" size="lg" active>
|
352 | Link
|
353 | </Button>
|
354 | </div>
|
355 | );
|
356 |
|
357 | const Example13 = (
|
358 | <div>
|
359 | <Button color="primary" size="lg" disabled>
|
360 | Primary button
|
361 | </Button>{' '}
|
362 | <Button color="secondary" size="lg" disabled>
|
363 | Button
|
364 | </Button>
|
365 | </div>
|
366 | );
|
367 |
|
368 | interface CustomButtonProps extends ButtonProps {
|
369 | customProp: string;
|
370 | }
|
371 |
|
372 |
|
373 |
|
374 | const CustomButton: React.SFC<CustomButtonProps> = (props) => (
|
375 | <Button {...props} />
|
376 | );
|
377 |
|
378 | class Example14 extends React.Component<any, any> {
|
379 | state: any;
|
380 | constructor(props: any) {
|
381 | super(props);
|
382 |
|
383 | this.state = { cSelected: [] };
|
384 |
|
385 | this.onRadioBtnClick = this.onRadioBtnClick.bind(this);
|
386 | this.onCheckboxBtnClick = this.onCheckboxBtnClick.bind(this);
|
387 | }
|
388 |
|
389 | onRadioBtnClick(rSelected: number) {
|
390 | this.setState({ rSelected });
|
391 | }
|
392 |
|
393 | onCheckboxBtnClick(selected: number) {
|
394 | const index = this.state.cSelected.indexOf(selected);
|
395 | if (index < 0) {
|
396 | this.state.cSelected.push(selected);
|
397 | } else {
|
398 | this.state.cSelected.splice(index, 1);
|
399 | }
|
400 | this.setState({ cSelected: [...this.state.cSelected] });
|
401 | }
|
402 |
|
403 | render() {
|
404 | return (
|
405 | <div>
|
406 | <h5>Radio Buttons</h5>
|
407 | <ButtonGroup>
|
408 | <Button
|
409 | color="primary"
|
410 | onClick={() => this.onRadioBtnClick(1)}
|
411 | active={this.state.rSelected === 1}
|
412 | >
|
413 | One
|
414 | </Button>
|
415 | <Button
|
416 | color="primary"
|
417 | onClick={() => this.onRadioBtnClick(2)}
|
418 | active={this.state.rSelected === 2}
|
419 | >
|
420 | Two
|
421 | </Button>
|
422 | <Button
|
423 | color="primary"
|
424 | onClick={() => this.onRadioBtnClick(3)}
|
425 | active={this.state.rSelected === 3}
|
426 | >
|
427 | Three
|
428 | </Button>
|
429 | </ButtonGroup>
|
430 | <p>Selected: {this.state.rSelected}</p>
|
431 |
|
432 | <h5>Checkbox Buttons</h5>
|
433 | <ButtonGroup>
|
434 | <Button
|
435 | color="primary"
|
436 | onClick={() => this.onCheckboxBtnClick(1)}
|
437 | active={this.state.cSelected.includes(1)}
|
438 | >
|
439 | One
|
440 | </Button>
|
441 | <Button
|
442 | color="primary"
|
443 | onClick={() => this.onCheckboxBtnClick(2)}
|
444 | active={this.state.cSelected.includes(2)}
|
445 | >
|
446 | Two
|
447 | </Button>
|
448 | <Button
|
449 | color="primary"
|
450 | onClick={() => this.onCheckboxBtnClick(3)}
|
451 | active={this.state.cSelected.includes(3)}
|
452 | >
|
453 | Three
|
454 | </Button>
|
455 | </ButtonGroup>
|
456 | <p>Selected: {JSON.stringify(this.state.cSelected)}</p>
|
457 | </div>
|
458 | );
|
459 | }
|
460 | }
|
461 |
|
462 | const ExampleButtonClose = () => (
|
463 | <div>
|
464 | <CardGroup>
|
465 | <Card>
|
466 | <CardBody>
|
467 | <CardTitle>
|
468 | <Button close />
|
469 | </CardTitle>
|
470 | <CardText>Default close icon</CardText>
|
471 | </CardBody>
|
472 | </Card>
|
473 | <Card>
|
474 | <CardBody>
|
475 | <CardTitle>
|
476 | <Button close aria-label="Cancel">
|
477 | <span aria-hidden>–</span>
|
478 | </Button>
|
479 | </CardTitle>
|
480 | <CardText>Custom content and aria-label</CardText>
|
481 | </CardBody>
|
482 | </Card>
|
483 | </CardGroup>
|
484 | </div>
|
485 | );
|
486 |
|
487 | class ExampleButtonToggle extends React.Component {
|
488 | render() {
|
489 | return (
|
490 | <div>
|
491 | <ButtonToggle color="primary">primary</ButtonToggle>{' '}
|
492 | <ButtonToggle color="secondary">secondary</ButtonToggle>{' '}
|
493 | <ButtonToggle color="success">success</ButtonToggle>{' '}
|
494 | <ButtonToggle color="info">info</ButtonToggle>{' '}
|
495 | <ButtonToggle color="warning">warning</ButtonToggle>{' '}
|
496 | <ButtonToggle color="danger">danger</ButtonToggle>{' '}
|
497 | </div>
|
498 | );
|
499 | }
|
500 | }
|
501 |
|
502 |
|
503 | class Example15 extends React.Component<any, any> {
|
504 | state: any;
|
505 | constructor(props: any) {
|
506 | super(props);
|
507 |
|
508 | this.toggle = this.toggle.bind(this);
|
509 | this.state = {
|
510 | dropdownOpen: false,
|
511 | };
|
512 | }
|
513 |
|
514 | toggle() {
|
515 | this.setState({
|
516 | dropdownOpen: !this.state.dropdownOpen,
|
517 | });
|
518 | }
|
519 |
|
520 | render() {
|
521 | return (
|
522 | <ButtonDropdown isOpen={this.state.dropdownOpen} toggle={this.toggle}>
|
523 | <DropdownToggle caret>Button Dropdown</DropdownToggle>
|
524 | <DropdownMenu>
|
525 | <DropdownItem header>Header</DropdownItem>
|
526 | <DropdownItem disabled>Action</DropdownItem>
|
527 | <DropdownItem>Another Action</DropdownItem>
|
528 | <DropdownItem divider />
|
529 | <DropdownItem
|
530 | onClick={(event: React.MouseEvent<HTMLElement>) => {
|
531 |
|
532 | }}
|
533 | >
|
534 | Another Action
|
535 | </DropdownItem>
|
536 | </DropdownMenu>
|
537 | </ButtonDropdown>
|
538 | );
|
539 | }
|
540 | }
|
541 |
|
542 | const Example16 = (
|
543 | <ButtonDropdown isOpen={true} toggle={() => true}>
|
544 | <DropdownToggle caret color="primary">
|
545 | Text
|
546 | </DropdownToggle>
|
547 | <DropdownMenu>
|
548 | <DropdownItem header>Header</DropdownItem>
|
549 | <DropdownItem disabled>Action</DropdownItem>
|
550 | <DropdownItem>Another Action</DropdownItem>
|
551 | <DropdownItem divider />
|
552 | <DropdownItem>Another Action</DropdownItem>
|
553 | </DropdownMenu>
|
554 | </ButtonDropdown>
|
555 | );
|
556 |
|
557 | const Example17 = (props: any) => (
|
558 | <ButtonDropdown isOpen={true} toggle={() => true}>
|
559 | <Button id="caret" color="primary">
|
560 | {props.text}
|
561 | </Button>
|
562 | <DropdownToggle caret color="primary" />
|
563 | <DropdownMenu>
|
564 | <DropdownItem header>Header</DropdownItem>
|
565 | <DropdownItem disabled>Action</DropdownItem>
|
566 | <DropdownItem>Another Action</DropdownItem>
|
567 | <DropdownItem divider />
|
568 | <DropdownItem>Another Action</DropdownItem>
|
569 | </DropdownMenu>
|
570 | </ButtonDropdown>
|
571 | );
|
572 |
|
573 | const Example18 = (
|
574 | <div>
|
575 | <ButtonDropdown isOpen={true} toggle={() => true}>
|
576 | <DropdownToggle caret size="lg">
|
577 | Large Button
|
578 | </DropdownToggle>
|
579 | <DropdownMenu>
|
580 | <DropdownItem>Another Action</DropdownItem>
|
581 | <DropdownItem>Another Action</DropdownItem>
|
582 | </DropdownMenu>
|
583 | </ButtonDropdown>
|
584 |
|
585 | <ButtonDropdown isOpen={true} toggle={() => true}>
|
586 | <DropdownToggle caret size="sm">
|
587 | Small Button
|
588 | </DropdownToggle>
|
589 | <DropdownMenu>
|
590 | <DropdownItem>Another Action</DropdownItem>
|
591 | <DropdownItem>Another Action</DropdownItem>
|
592 | </DropdownMenu>
|
593 | </ButtonDropdown>
|
594 | </div>
|
595 | );
|
596 |
|
597 | const Example19 = (
|
598 | <ButtonDropdown isOpen={true} toggle={() => true} direction="up">
|
599 | <DropdownToggle caret size="lg">
|
600 | Dropup
|
601 | </DropdownToggle>
|
602 | <DropdownMenu>
|
603 | <DropdownItem>Another Action</DropdownItem>
|
604 | <DropdownItem>Another Action</DropdownItem>
|
605 | </DropdownMenu>
|
606 | </ButtonDropdown>
|
607 | );
|
608 |
|
609 |
|
610 | class Example20 extends React.Component {
|
611 | render() {
|
612 | return (
|
613 | <ButtonGroup>
|
614 | <Button>Left</Button> <Button>Middle</Button> <Button>Right</Button>
|
615 | </ButtonGroup>
|
616 | );
|
617 | }
|
618 | }
|
619 |
|
620 | class Example21 extends React.Component {
|
621 | render() {
|
622 | return (
|
623 | <ButtonToolbar>
|
624 | <ButtonGroup>
|
625 | <Button>1</Button>
|
626 | <Button>2</Button>
|
627 | <Button>3</Button>
|
628 | <Button>4</Button>
|
629 | </ButtonGroup>
|
630 | <ButtonGroup>
|
631 | <Button>5</Button>
|
632 | <Button>6</Button>
|
633 | <Button>7</Button>
|
634 | </ButtonGroup>
|
635 | <ButtonGroup>
|
636 | <Button>8</Button>
|
637 | </ButtonGroup>
|
638 | </ButtonToolbar>
|
639 | );
|
640 | }
|
641 | }
|
642 |
|
643 | const Example22 = (props: any) => (
|
644 | <div>
|
645 | <ButtonGroup size="lg">
|
646 | <Button>Left</Button>
|
647 | <Button>Middle</Button>
|
648 | <Button>Right</Button>
|
649 | </ButtonGroup>
|
650 |
|
651 | <ButtonGroup>
|
652 | <Button>Left</Button>
|
653 | <Button>Middle</Button>
|
654 | <Button>Right</Button>
|
655 | </ButtonGroup>
|
656 |
|
657 | <ButtonGroup size="sm">
|
658 | <Button>Left</Button>
|
659 | <Button>Middle</Button>
|
660 | <Button>Right</Button>
|
661 | </ButtonGroup>
|
662 | </div>
|
663 | );
|
664 |
|
665 | const Example23 = (props: any) => (
|
666 | <ButtonGroup>
|
667 | <Button>1</Button>
|
668 | <Button>2</Button>
|
669 | <ButtonDropdown isOpen={true} toggle={() => true}>
|
670 | <DropdownToggle caret>Dropdown</DropdownToggle>
|
671 | <DropdownMenu>
|
672 | <DropdownItem>Dropdown Link</DropdownItem>
|
673 | <DropdownItem>Dropdown Link</DropdownItem>
|
674 | </DropdownMenu>
|
675 | </ButtonDropdown>
|
676 | </ButtonGroup>
|
677 | );
|
678 |
|
679 | const Example24 = (props: any) => (
|
680 | <ButtonGroup vertical>
|
681 | <Button>1</Button>
|
682 | <Button>2</Button>
|
683 | <ButtonDropdown isOpen={props.dropdownOpen} toggle={() => true}>
|
684 | <DropdownToggle caret>Dropdown</DropdownToggle>
|
685 | <DropdownMenu>
|
686 | <DropdownItem>Dropdown Link</DropdownItem>
|
687 | <DropdownItem>Dropdown Link</DropdownItem>
|
688 | </DropdownMenu>
|
689 | </ButtonDropdown>
|
690 | </ButtonGroup>
|
691 | );
|
692 |
|
693 |
|
694 | const Example25 = (props: any) => {
|
695 | return (
|
696 | <div>
|
697 | <Card>
|
698 | <CardImg
|
699 | top
|
700 | width="100%"
|
701 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=318%C3%97180&w=318&h=180"
|
702 | alt="Card image cap"
|
703 | />
|
704 | <CardBody>
|
705 | <CardTitle>Card title</CardTitle>
|
706 | <CardSubtitle>Card subtitle</CardSubtitle>
|
707 | <CardText>
|
708 | Some quick example text to build on the card title and make up the
|
709 | bulk of the card's content.
|
710 | </CardText>
|
711 | <Button>Button</Button>
|
712 | </CardBody>
|
713 | </Card>
|
714 | </div>
|
715 | );
|
716 | };
|
717 |
|
718 | const Example26 = (props: any) => {
|
719 | return (
|
720 | <div>
|
721 | <Card>
|
722 | <CardBody>
|
723 | <CardTitle>Card title</CardTitle>
|
724 | <CardSubtitle>Card subtitle</CardSubtitle>
|
725 | </CardBody>
|
726 | <img
|
727 | width="100%"
|
728 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=318%C3%97180&w=318&h=180"
|
729 | alt="Card image cap"
|
730 | />
|
731 | <CardBody>
|
732 | <CardText>
|
733 | Some quick example text to build on the card title and make up the
|
734 | bulk of the card's content.
|
735 | </CardText>
|
736 | <CardLink href="#">Card Link</CardLink>
|
737 | <CardLink href="#">Another Link</CardLink>
|
738 | </CardBody>
|
739 | </Card>
|
740 | </div>
|
741 | );
|
742 | };
|
743 |
|
744 | const Example27 = (props: any) => {
|
745 | return (
|
746 | <Row noGutters>
|
747 | <Col sm="6" cssModule={{ col: 'test' }}>
|
748 | <Card body>
|
749 | <CardTitle>Special Title Treatment</CardTitle>
|
750 | <CardText>
|
751 | With supporting text below as a natural lead-in to additional
|
752 | content.
|
753 | </CardText>
|
754 | <Button>Go somewhere</Button>
|
755 | </Card>
|
756 | </Col>
|
757 | <Col sm="6">
|
758 | <Card body>
|
759 | <CardTitle>Special Title Treatment</CardTitle>
|
760 | <CardText>
|
761 | With supporting text below as a natural lead-in to additional
|
762 | content.
|
763 | </CardText>
|
764 | <Button>Go somewhere</Button>
|
765 | </Card>
|
766 | </Col>
|
767 | </Row>
|
768 | );
|
769 | };
|
770 |
|
771 | const Example28 = (props: any) => {
|
772 | return (
|
773 | <div>
|
774 | <Card body>
|
775 | <CardTitle>Special Title Treatment</CardTitle>
|
776 | <CardText>
|
777 | With supporting text below as a natural lead-in to additional content.
|
778 | </CardText>
|
779 | <Button>Go somewhere</Button>
|
780 | </Card>
|
781 | <Card body className="text-center">
|
782 | <CardTitle>Special Title Treatment</CardTitle>
|
783 | <CardText>
|
784 | With supporting text below as a natural lead-in to additional content.
|
785 | </CardText>
|
786 | <Button>Go somewhere</Button>
|
787 | </Card>
|
788 | <Card body className="text-right">
|
789 | <CardTitle>Special Title Treatment</CardTitle>
|
790 | <CardText>
|
791 | With supporting text below as a natural lead-in to additional content.
|
792 | </CardText>
|
793 | <Button>Go somewhere</Button>
|
794 | </Card>
|
795 | </div>
|
796 | );
|
797 | };
|
798 |
|
799 | const Example29 = (props: any) => {
|
800 | return (
|
801 | <div>
|
802 | <Card>
|
803 | <CardHeader>Header</CardHeader>
|
804 | <CardBody>
|
805 | <CardTitle>Special Title Treatment</CardTitle>
|
806 | <CardText>
|
807 | With supporting text below as a natural lead-in to additional
|
808 | content.
|
809 | </CardText>
|
810 | <Button>Go somewhere</Button>
|
811 | </CardBody>
|
812 | <CardFooter>Footer</CardFooter>
|
813 | </Card>
|
814 |
|
815 | <Card>
|
816 | <CardHeader tag="h3">Featured</CardHeader>
|
817 | <CardBody>
|
818 | <CardTitle>Special Title Treatment</CardTitle>
|
819 | <CardText>
|
820 | With supporting text below as a natural lead-in to additional
|
821 | content.
|
822 | </CardText>
|
823 | <Button>Go somewhere</Button>
|
824 | </CardBody>
|
825 | <CardFooter className="text-muted">Footer</CardFooter>
|
826 | </Card>
|
827 | </div>
|
828 | );
|
829 | };
|
830 |
|
831 | const Example30 = (props: any) => {
|
832 | return (
|
833 | <div>
|
834 | <Card>
|
835 | <CardImg
|
836 | top
|
837 | width="100%"
|
838 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=318%C3%97180&w=318&h=180"
|
839 | alt="Card image cap"
|
840 | />
|
841 | <CardBody>
|
842 | <CardTitle>Card Title</CardTitle>
|
843 | <CardText>
|
844 | This is a wider card with supporting text below as a natural lead-in
|
845 | to additional content. This content is a little bit longer.
|
846 | </CardText>
|
847 | <CardText>
|
848 | <small className="text-muted">Last updated 3 mins ago</small>
|
849 | </CardText>
|
850 | </CardBody>
|
851 | </Card>
|
852 | <Card>
|
853 | <CardBody>
|
854 | <CardTitle>Card Title</CardTitle>
|
855 | <CardText>
|
856 | This is a wider card with supporting text below as a natural lead-in
|
857 | to additional content. This content is a little bit longer.
|
858 | </CardText>
|
859 | <CardText>
|
860 | <small className="text-muted">Last updated 3 mins ago</small>
|
861 | </CardText>
|
862 | </CardBody>
|
863 | <CardImg
|
864 | bottom
|
865 | width="100%"
|
866 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=318%C3%97180&w=318&h=180"
|
867 | alt="Card image cap"
|
868 | />
|
869 | </Card>
|
870 | </div>
|
871 | );
|
872 | };
|
873 |
|
874 | const Example31 = (props: any) => {
|
875 | return (
|
876 | <div>
|
877 | <Card inverse>
|
878 | <CardImg
|
879 | width="100%"
|
880 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=318%C3%97270&w=318&h=270&bg=333333&txtclr=666666"
|
881 | alt="Card image cap"
|
882 | />
|
883 | <CardImgOverlay>
|
884 | <CardTitle>Card Title</CardTitle>
|
885 | <CardText>
|
886 | This is a wider card with supporting text below as a natural lead-in
|
887 | to additional content. This content is a little bit longer.
|
888 | </CardText>
|
889 | <CardText>
|
890 | <small className="text-muted">Last updated 3 mins ago</small>
|
891 | </CardText>
|
892 | </CardImgOverlay>
|
893 | </Card>
|
894 | </div>
|
895 | );
|
896 | };
|
897 |
|
898 | const Example32 = (props: any) => {
|
899 | return (
|
900 | <div>
|
901 | <Card
|
902 | body
|
903 | inverse
|
904 | style={{ backgroundColor: '#333', borderColor: '#333' }}
|
905 | >
|
906 | <CardTitle>Special Title Treatment</CardTitle>
|
907 | <CardText>
|
908 | With supporting text below as a natural lead-in to additional content.
|
909 | </CardText>
|
910 | <Button>Button</Button>
|
911 | </Card>
|
912 | <Card body inverse color="primary">
|
913 | <CardTitle>Special Title Treatment</CardTitle>
|
914 | <CardText>
|
915 | With supporting text below as a natural lead-in to additional content.
|
916 | </CardText>
|
917 | <Button color="secondary">Button</Button>
|
918 | </Card>
|
919 | <Card body inverse color="success">
|
920 | <CardTitle>Special Title Treatment</CardTitle>
|
921 | <CardText>
|
922 | With supporting text below as a natural lead-in to additional content.
|
923 | </CardText>
|
924 | <Button color="secondary">Button</Button>
|
925 | </Card>
|
926 | <Card body inverse color="info">
|
927 | <CardTitle>Special Title Treatment</CardTitle>
|
928 | <CardText>
|
929 | With supporting text below as a natural lead-in to additional content.
|
930 | </CardText>
|
931 | <Button color="secondary">Button</Button>
|
932 | </Card>
|
933 | <Card body inverse color="warning">
|
934 | <CardTitle>Special Title Treatment</CardTitle>
|
935 | <CardText>
|
936 | With supporting text below as a natural lead-in to additional content.
|
937 | </CardText>
|
938 | <Button color="secondary">Button</Button>
|
939 | </Card>
|
940 | <Card body inverse color="danger">
|
941 | <CardTitle>Special Title Treatment</CardTitle>
|
942 | <CardText>
|
943 | With supporting text below as a natural lead-in to additional content.
|
944 | </CardText>
|
945 | <Button color="secondary">Button</Button>
|
946 | </Card>
|
947 | </div>
|
948 | );
|
949 | };
|
950 |
|
951 | const Example33 = (props: any) => {
|
952 | return (
|
953 | <div>
|
954 | <Card body outline color="secondary">
|
955 | <CardTitle>Special Title Treatment</CardTitle>
|
956 | <CardText>
|
957 | With supporting text below as a natural lead-in to additional content.
|
958 | </CardText>
|
959 | <Button>Button</Button>
|
960 | </Card>
|
961 | <Card body outline color="primary">
|
962 | <CardTitle>Special Title Treatment</CardTitle>
|
963 | <CardText>
|
964 | With supporting text below as a natural lead-in to additional content.
|
965 | </CardText>
|
966 | <Button color="secondary">Button</Button>
|
967 | </Card>
|
968 | <Card body outline color="success">
|
969 | <CardTitle>Special Title Treatment</CardTitle>
|
970 | <CardText>
|
971 | With supporting text below as a natural lead-in to additional content.
|
972 | </CardText>
|
973 | <Button color="secondary">Button</Button>
|
974 | </Card>
|
975 | <Card body outline color="info">
|
976 | <CardTitle>Special Title Treatment</CardTitle>
|
977 | <CardText>
|
978 | With supporting text below as a natural lead-in to additional content.
|
979 | </CardText>
|
980 | <Button color="secondary">Button</Button>
|
981 | </Card>
|
982 | <Card body outline color="warning">
|
983 | <CardTitle>Special Title Treatment</CardTitle>
|
984 | <CardText>
|
985 | With supporting text below as a natural lead-in to additional content.
|
986 | </CardText>
|
987 | <Button color="secondary">Button</Button>
|
988 | </Card>
|
989 | <Card body outline color="danger">
|
990 | <CardTitle>Special Title Treatment</CardTitle>
|
991 | <CardText>
|
992 | With supporting text below as a natural lead-in to additional content.
|
993 | </CardText>
|
994 | <Button color="secondary">Button</Button>
|
995 | </Card>
|
996 | </div>
|
997 | );
|
998 | };
|
999 |
|
1000 | const Example34 = (props: any) => {
|
1001 | return (
|
1002 | <CardGroup>
|
1003 | <Card>
|
1004 | <CardImg
|
1005 | top
|
1006 | width="100%"
|
1007 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=256%C3%97180&w=256&h=180"
|
1008 | alt="Card image cap"
|
1009 | />
|
1010 | <CardBody>
|
1011 | <CardTitle>Card title</CardTitle>
|
1012 | <CardSubtitle>Card subtitle</CardSubtitle>
|
1013 | <CardText>
|
1014 | This is a wider card with supporting text below as a natural lead-in
|
1015 | to additional content. This content is a little bit longer.
|
1016 | </CardText>
|
1017 | <Button>Button</Button>
|
1018 | </CardBody>
|
1019 | </Card>
|
1020 | <Card>
|
1021 | <CardImg
|
1022 | top
|
1023 | width="100%"
|
1024 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=256%C3%97180&w=256&h=180"
|
1025 | alt="Card image cap"
|
1026 | />
|
1027 | <CardBody>
|
1028 | <CardTitle>Card title</CardTitle>
|
1029 | <CardSubtitle>Card subtitle</CardSubtitle>
|
1030 | <CardText>
|
1031 | This card has supporting text below as a natural lead-in to
|
1032 | additional content.
|
1033 | </CardText>
|
1034 | <Button>Button</Button>
|
1035 | </CardBody>
|
1036 | </Card>
|
1037 | <Card>
|
1038 | <CardImg
|
1039 | top
|
1040 | width="100%"
|
1041 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=256%C3%97180&w=256&h=180"
|
1042 | alt="Card image cap"
|
1043 | />
|
1044 | <CardBody>
|
1045 | <CardTitle>Card title</CardTitle>
|
1046 | <CardSubtitle>Card subtitle</CardSubtitle>
|
1047 | <CardText>
|
1048 | This is a wider card with supporting text below as a natural lead-in
|
1049 | to additional content. This card has even longer content than the
|
1050 | first to show that equal height action.
|
1051 | </CardText>
|
1052 | <Button>Button</Button>
|
1053 | </CardBody>
|
1054 | </Card>
|
1055 | </CardGroup>
|
1056 | );
|
1057 | };
|
1058 |
|
1059 | const Example35 = (props: any) => {
|
1060 | return (
|
1061 | <CardDeck>
|
1062 | <Card>
|
1063 | <CardImg
|
1064 | top
|
1065 | width="100%"
|
1066 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=256%C3%97180&w=256&h=180"
|
1067 | alt="Card image cap"
|
1068 | />
|
1069 | <CardBody>
|
1070 | <CardTitle>Card title</CardTitle>
|
1071 | <CardSubtitle>Card subtitle</CardSubtitle>
|
1072 | <CardText>
|
1073 | This is a wider card with supporting text below as a natural lead-in
|
1074 | to additional content. This content is a little bit longer.
|
1075 | </CardText>
|
1076 | <Button>Button</Button>
|
1077 | </CardBody>
|
1078 | </Card>
|
1079 | <Card>
|
1080 | <CardImg
|
1081 | top
|
1082 | width="100%"
|
1083 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=256%C3%97180&w=256&h=180"
|
1084 | alt="Card image cap"
|
1085 | />
|
1086 | <CardBody>
|
1087 | <CardTitle>Card title</CardTitle>
|
1088 | <CardSubtitle>Card subtitle</CardSubtitle>
|
1089 | <CardText>
|
1090 | This card has supporting text below as a natural lead-in to
|
1091 | additional content.
|
1092 | </CardText>
|
1093 | <Button>Button</Button>
|
1094 | </CardBody>
|
1095 | </Card>
|
1096 | <Card>
|
1097 | <CardImg
|
1098 | top
|
1099 | width="100%"
|
1100 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=256%C3%97180&w=256&h=180"
|
1101 | alt="Card image cap"
|
1102 | />
|
1103 | <CardBody>
|
1104 | <CardTitle>Card title</CardTitle>
|
1105 | <CardSubtitle>Card subtitle</CardSubtitle>
|
1106 | <CardText>
|
1107 | This is a wider card with supporting text below as a natural lead-in
|
1108 | to additional content. This card has even longer content than the
|
1109 | first to show that equal height action.
|
1110 | </CardText>
|
1111 | <Button>Button</Button>
|
1112 | </CardBody>
|
1113 | </Card>
|
1114 | </CardDeck>
|
1115 | );
|
1116 | };
|
1117 |
|
1118 | const Example36 = (props: any) => {
|
1119 | return (
|
1120 | <CardColumns>
|
1121 | <Card>
|
1122 | <CardImg
|
1123 | top
|
1124 | width="100%"
|
1125 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=256%C3%97180&w=256&h=180"
|
1126 | alt="Card image cap"
|
1127 | />
|
1128 | <CardBody>
|
1129 | <CardTitle>Card title</CardTitle>
|
1130 | <CardSubtitle>Card subtitle</CardSubtitle>
|
1131 | <CardText>
|
1132 | This is a wider card with supporting text below as a natural lead-in
|
1133 | to additional content. This content is a little bit longer.
|
1134 | </CardText>
|
1135 | <Button>Button</Button>
|
1136 | </CardBody>
|
1137 | </Card>
|
1138 | <Card>
|
1139 | <CardImg
|
1140 | top
|
1141 | width="100%"
|
1142 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=256%C3%97180&w=256&h=180"
|
1143 | alt="Card image cap"
|
1144 | />
|
1145 | </Card>
|
1146 | <Card>
|
1147 | <CardBody>
|
1148 | <CardTitle>Card title</CardTitle>
|
1149 | <CardSubtitle>Card subtitle</CardSubtitle>
|
1150 | <CardText>
|
1151 | This card has supporting text below as a natural lead-in to
|
1152 | additional content.
|
1153 | </CardText>
|
1154 | <Button>Button</Button>
|
1155 | </CardBody>
|
1156 | </Card>
|
1157 | <Card
|
1158 | body
|
1159 | inverse
|
1160 | style={{ backgroundColor: '#333', borderColor: '#333' }}
|
1161 | >
|
1162 | <CardTitle>Special Title Treatment</CardTitle>
|
1163 | <CardText>
|
1164 | With supporting text below as a natural lead-in to additional content.
|
1165 | </CardText>
|
1166 | <Button>Button</Button>
|
1167 | </Card>
|
1168 | <Card>
|
1169 | <CardImg
|
1170 | top
|
1171 | width="100%"
|
1172 | src="https://placeholdit.imgix.net/~text?txtsize=33&txt=256%C3%97180&w=256&h=180"
|
1173 | alt="Card image cap"
|
1174 | />
|
1175 | <CardBody>
|
1176 | <CardTitle>Card title</CardTitle>
|
1177 | <CardSubtitle>Card subtitle</CardSubtitle>
|
1178 | <CardText>
|
1179 | This is a wider card with supporting text below as a natural lead-in
|
1180 | to additional content. This card has even longer content than the
|
1181 | first to show that equal height action.
|
1182 | </CardText>
|
1183 | <Button>Button</Button>
|
1184 | </CardBody>
|
1185 | </Card>
|
1186 | <Card body inverse color="primary">
|
1187 | <CardTitle>Special Title Treatment</CardTitle>
|
1188 | <CardText>
|
1189 | With supporting text below as a natural lead-in to additional content.
|
1190 | </CardText>
|
1191 | <Button color="secondary">Button</Button>
|
1192 | </Card>
|
1193 | </CardColumns>
|
1194 | );
|
1195 | };
|
1196 |
|
1197 |
|
1198 |
|
1199 | class Example37 extends React.Component<any, any> {
|
1200 | state: any;
|
1201 | constructor(props: any) {
|
1202 | super(props);
|
1203 | this.toggle = this.toggle.bind(this);
|
1204 | this.state = { collapse: false };
|
1205 | }
|
1206 |
|
1207 | toggle() {
|
1208 | this.setState({ collapse: !this.state.collapse });
|
1209 | }
|
1210 |
|
1211 | render() {
|
1212 | return (
|
1213 | <div>
|
1214 | <Button
|
1215 | color="primary"
|
1216 | onClick={this.toggle}
|
1217 | style={{ marginBottom: '1rem' }}
|
1218 | >
|
1219 | Toggle
|
1220 | </Button>
|
1221 | <Collapse isOpen={this.state.collapse}>
|
1222 | <Card>
|
1223 | <CardBody>
|
1224 | Anim pariatur cliche reprehenderit, enim eiusmod high life
|
1225 | accusamus terry richardson ad squid. Nihil anim keffiyeh
|
1226 | helvetica, craft beer labore wes anderson cred nesciunt sapiente
|
1227 | ea proident.
|
1228 | </CardBody>
|
1229 | </Card>
|
1230 | </Collapse>
|
1231 | </div>
|
1232 | );
|
1233 | }
|
1234 | }
|
1235 |
|
1236 | class Example38 extends React.Component<any, any> {
|
1237 | state: any;
|
1238 | constructor(props: any) {
|
1239 | super(props);
|
1240 | this.onOpened = this.onOpened.bind(this);
|
1241 | this.onClosed = this.onClosed.bind(this);
|
1242 | this.toggle = this.toggle.bind(this);
|
1243 | this.state = { collapse: false, status: 'Closed' };
|
1244 | }
|
1245 |
|
1246 | onOpened() {
|
1247 | this.setState({ ...this.state, status: 'Opened' });
|
1248 | }
|
1249 |
|
1250 | onClosed() {
|
1251 | this.setState({ ...this.state, status: 'Closed' });
|
1252 | }
|
1253 |
|
1254 | toggle() {
|
1255 | const status = !this.state.collapse ? 'Opening...' : 'Closing...';
|
1256 | this.setState({ collapse: !this.state.collapse, status });
|
1257 | }
|
1258 |
|
1259 | render() {
|
1260 | return (
|
1261 | <div>
|
1262 | <Button
|
1263 | color="primary"
|
1264 | onClick={this.toggle}
|
1265 | style={{ marginBottom: '1rem' }}
|
1266 | >
|
1267 | Toggle
|
1268 | </Button>
|
1269 | <h5>Current state: {this.state.status}</h5>
|
1270 | <Collapse
|
1271 | isOpen={this.state.collapse}
|
1272 | onOpened={this.onOpened}
|
1273 | onClosed={this.onClosed}
|
1274 | >
|
1275 | <Card>
|
1276 | <CardBody>
|
1277 | Anim pariatur cliche reprehenderit, enim eiusmod high life
|
1278 | accusamus terry richardson ad squid. Nihil anim keffiyeh
|
1279 | helvetica, craft beer labore wes anderson cred nesciunt sapiente
|
1280 | ea proident.
|
1281 | </CardBody>
|
1282 | </Card>
|
1283 | </Collapse>
|
1284 | </div>
|
1285 | );
|
1286 | }
|
1287 | }
|
1288 |
|
1289 |
|
1290 |
|
1291 | class Example39 extends React.Component<any, any> {
|
1292 | state: any;
|
1293 | constructor(props: any) {
|
1294 | super(props);
|
1295 |
|
1296 | this.toggle = this.toggle.bind(this);
|
1297 | this.state = {
|
1298 | dropdownOpen: false,
|
1299 | };
|
1300 | }
|
1301 |
|
1302 | toggle() {
|
1303 | this.setState({
|
1304 | dropdownOpen: !this.state.dropdownOpen,
|
1305 | });
|
1306 | }
|
1307 |
|
1308 | render() {
|
1309 | return (
|
1310 | <Dropdown isOpen={this.state.dropdownOpen} toggle={this.toggle}>
|
1311 | <DropdownToggle caret>Dropdown</DropdownToggle>
|
1312 | <DropdownMenu>
|
1313 | <DropdownItem header>Header</DropdownItem>
|
1314 | <DropdownItem disabled>Action</DropdownItem>
|
1315 | <DropdownItem>Another Action</DropdownItem>
|
1316 | <DropdownItem divider />
|
1317 | <DropdownItem>Another Action</DropdownItem>
|
1318 | </DropdownMenu>
|
1319 | </Dropdown>
|
1320 | );
|
1321 | }
|
1322 | }
|
1323 |
|
1324 | const Example40 = (props: any) => (
|
1325 | <Dropdown isOpen={false} toggle={() => false}>
|
1326 | <DropdownToggle caret>Dropdown</DropdownToggle>
|
1327 | <DropdownMenu right>
|
1328 | <DropdownItem header>Header</DropdownItem>
|
1329 | <DropdownItem disabled>Action</DropdownItem>
|
1330 | <DropdownItem>Another Action</DropdownItem>
|
1331 | <DropdownItem divider />
|
1332 | <DropdownItem>Another Action</DropdownItem>
|
1333 | </DropdownMenu>
|
1334 | </Dropdown>
|
1335 | );
|
1336 |
|
1337 | const Example41 = (props: any) => <DropdownItem header>Header</DropdownItem>;
|
1338 |
|
1339 | const Example42 = (props: any) => (
|
1340 | <div>
|
1341 | <DropdownItem divider />
|
1342 | <DropdownItem>Action</DropdownItem>
|
1343 | <DropdownItem disabled>Action</DropdownItem>
|
1344 | <Dropdown group isOpen={true} size="lg" toggle={() => true}>
|
1345 | <DropdownToggle caret>asdfasd</DropdownToggle>
|
1346 | <DropdownMenu>sadfas</DropdownMenu>
|
1347 | </Dropdown>
|
1348 |
|
1349 | <Dropdown isOpen={true} toggle={() => true}>
|
1350 | <DropdownToggle caret>sadfasd</DropdownToggle>
|
1351 | <DropdownMenu>sadf</DropdownMenu>
|
1352 | </Dropdown>
|
1353 |
|
1354 | <Dropdown group isOpen={true} size="sm" toggle={() => true}>
|
1355 | <DropdownToggle caret>asdf</DropdownToggle>
|
1356 | <DropdownMenu>sasdfsdf</DropdownMenu>
|
1357 | </Dropdown>
|
1358 | </div>
|
1359 | );
|
1360 |
|
1361 | class Example43 extends React.Component<any, any> {
|
1362 | state: any;
|
1363 | constructor(props: any) {
|
1364 | super(props);
|
1365 |
|
1366 | this.toggle = this.toggle.bind(this);
|
1367 | this.state = {
|
1368 | dropdownOpen: false,
|
1369 | };
|
1370 | }
|
1371 |
|
1372 | toggle() {
|
1373 | this.setState({
|
1374 | dropdownOpen: !this.state.dropdownOpen,
|
1375 | });
|
1376 | }
|
1377 |
|
1378 | render() {
|
1379 | return (
|
1380 | <Dropdown isOpen={this.state.dropdownOpen} toggle={this.toggle}>
|
1381 | <span
|
1382 | onClick={this.toggle}
|
1383 | data-toggle="dropdown"
|
1384 | aria-haspopup="true"
|
1385 | aria-expanded={this.state.dropdownOpen}
|
1386 | >
|
1387 | Custom Dropdown Content
|
1388 | </span>
|
1389 | <DropdownMenu>
|
1390 | <div onClick={this.toggle}>Custom dropdown item</div>
|
1391 | <div onClick={this.toggle}>Custom dropdown item</div>
|
1392 | <div onClick={this.toggle}>Custom dropdown item</div>
|
1393 | <div onClick={this.toggle}>Custom dropdown item</div>
|
1394 | </DropdownMenu>
|
1395 | </Dropdown>
|
1396 | );
|
1397 | }
|
1398 | }
|
1399 |
|
1400 | function Example44() {
|
1401 | return (
|
1402 | <UncontrolledDropdown className="some-class">
|
1403 | <DropdownToggle caret>Dropdown</DropdownToggle>
|
1404 | <DropdownMenu>
|
1405 | <DropdownItem header>Header</DropdownItem>
|
1406 | <DropdownItem disabled>Action</DropdownItem>
|
1407 | <DropdownItem>Another Action</DropdownItem>
|
1408 | <DropdownItem divider />
|
1409 | <DropdownItem>Another Action</DropdownItem>
|
1410 | </DropdownMenu>
|
1411 | </UncontrolledDropdown>
|
1412 | );
|
1413 | }
|
1414 |
|
1415 |
|
1416 | class Example45 extends React.Component {
|
1417 | render() {
|
1418 | return (
|
1419 | <Form>
|
1420 | <FormGroup>
|
1421 | <Label for="exampleEmail">Email</Label>
|
1422 | <Input
|
1423 | type="email"
|
1424 | name="email"
|
1425 | id="exampleEmail"
|
1426 | placeholder="with a placeholder"
|
1427 | />
|
1428 | </FormGroup>
|
1429 | <FormGroup>
|
1430 | <Label for="examplePassword">Password</Label>
|
1431 | <Input
|
1432 | type="password"
|
1433 | name="password"
|
1434 | id="examplePassword"
|
1435 | placeholder="password placeholder"
|
1436 | />
|
1437 | </FormGroup>
|
1438 | <FormGroup>
|
1439 | <Label for="exampleSelect">Select</Label>
|
1440 | <Input type="select" name="select" id="exampleSelect">
|
1441 | <option>1</option>
|
1442 | <option>2</option>
|
1443 | <option>3</option>
|
1444 | <option>4</option>
|
1445 | <option>5</option>
|
1446 | </Input>
|
1447 | </FormGroup>
|
1448 | <FormGroup>
|
1449 | <Label for="exampleSelectMulti">Select Multiple</Label>
|
1450 | <Input
|
1451 | type="select"
|
1452 | name="selectMulti"
|
1453 | id="exampleSelectMulti"
|
1454 | multiple
|
1455 | >
|
1456 | <option>1</option>
|
1457 | <option>2</option>
|
1458 | <option>3</option>
|
1459 | <option>4</option>
|
1460 | <option>5</option>
|
1461 | </Input>
|
1462 | </FormGroup>
|
1463 | <FormGroup>
|
1464 | <Label for="exampleText">Text Area</Label>
|
1465 | <Input type="textarea" name="text" id="exampleText" />
|
1466 | </FormGroup>
|
1467 | <FormGroup>
|
1468 | <Label for="exampleFile">File</Label>
|
1469 | <Input type="file" name="file" id="exampleFile" />
|
1470 | <FormText color="muted">
|
1471 | This is some placeholder block-level help text for the above input.
|
1472 | It's a bit lighter and easily wraps to a new line.
|
1473 | </FormText>
|
1474 | </FormGroup>
|
1475 | <FormGroup tag="fieldset">
|
1476 | <legend>Radio Buttons</legend>
|
1477 | <FormGroup check>
|
1478 | <Label check>
|
1479 | <Input type="radio" name="radio1" /> Option one is this and
|
1480 | that—be sure to include why it's great
|
1481 | </Label>
|
1482 | </FormGroup>
|
1483 | <FormGroup check>
|
1484 | <Label check>
|
1485 | <Input type="radio" name="radio1" /> Option two can be something
|
1486 | else and selecting it will deselect option one
|
1487 | </Label>
|
1488 | </FormGroup>
|
1489 | <FormGroup check disabled>
|
1490 | <Label check>
|
1491 | <Input type="radio" name="radio1" disabled /> Option three is
|
1492 | disabled
|
1493 | </Label>
|
1494 | </FormGroup>
|
1495 | </FormGroup>
|
1496 | <FormGroup check>
|
1497 | <Label check>
|
1498 | <Input type="checkbox" /> Check me out
|
1499 | </Label>
|
1500 | </FormGroup>
|
1501 | <FormGroup tag="fieldset">
|
1502 | <FormGroup check inline>
|
1503 | <Label check>
|
1504 | <Input type="checkbox" /> Check me out
|
1505 | </Label>
|
1506 | </FormGroup>
|
1507 | <FormGroup check inline>
|
1508 | <Label check>
|
1509 | <Input type="checkbox" /> Check me out as well
|
1510 | </Label>
|
1511 | </FormGroup>
|
1512 | </FormGroup>
|
1513 | <Button>Submit</Button>
|
1514 | </Form>
|
1515 | );
|
1516 | }
|
1517 | }
|
1518 |
|
1519 | class Example46 extends React.Component {
|
1520 | render() {
|
1521 | return (
|
1522 | <Form>
|
1523 | <FormGroup row>
|
1524 | <Label for="exampleEmail" sm={2}>
|
1525 | Email
|
1526 | </Label>
|
1527 | <Col sm={10}>
|
1528 | <Input
|
1529 | type="email"
|
1530 | name="email"
|
1531 | id="exampleEmail"
|
1532 | placeholder="with a placeholder"
|
1533 | />
|
1534 | </Col>
|
1535 | </FormGroup>
|
1536 | <FormGroup row>
|
1537 | <Label for="examplePassword" sm={2}>
|
1538 | Password
|
1539 | </Label>
|
1540 | <Col sm={10}>
|
1541 | <Input
|
1542 | type="password"
|
1543 | name="password"
|
1544 | id="examplePassword"
|
1545 | placeholder="password placeholder"
|
1546 | />
|
1547 | </Col>
|
1548 | </FormGroup>
|
1549 | <FormGroup row>
|
1550 | <Label for="exampleSelect" sm={2}>
|
1551 | Select
|
1552 | </Label>
|
1553 | <Col sm={10}>
|
1554 | <Input type="select" name="select" id="exampleSelect" />
|
1555 | </Col>
|
1556 | </FormGroup>
|
1557 | <FormGroup row>
|
1558 | <Label for="exampleSelectMulti" sm={2}>
|
1559 | Select Multiple
|
1560 | </Label>
|
1561 | <Col sm={10}>
|
1562 | <Input
|
1563 | type="select"
|
1564 | name="selectMulti"
|
1565 | id="exampleSelectMulti"
|
1566 | multiple
|
1567 | />
|
1568 | </Col>
|
1569 | </FormGroup>
|
1570 | <FormGroup row>
|
1571 | <Label for="exampleText" sm={2}>
|
1572 | Text Area
|
1573 | </Label>
|
1574 | <Col sm={10}>
|
1575 | <Input type="textarea" name="text" id="exampleText" />
|
1576 | </Col>
|
1577 | </FormGroup>
|
1578 | <FormGroup row>
|
1579 | <Label for="exampleFile" sm={2}>
|
1580 | File
|
1581 | </Label>
|
1582 | <Col sm={10}>
|
1583 | <Input type="file" name="file" id="exampleFile" />
|
1584 | <FormText color="muted">
|
1585 | This is some placeholder block-level help text for the above
|
1586 | input. It's a bit lighter and easily wraps to a new line.
|
1587 | </FormText>
|
1588 | </Col>
|
1589 | </FormGroup>
|
1590 | <FormGroup tag="fieldset" row>
|
1591 | <legend className="col-form-legend col-sm-2">Radio Buttons</legend>
|
1592 | <Col sm={10}>
|
1593 | <FormGroup check>
|
1594 | <Label check>
|
1595 | <Input type="radio" name="radio2" /> Option one is this and
|
1596 | that—be sure to include why it's great
|
1597 | </Label>
|
1598 | </FormGroup>
|
1599 | <FormGroup check>
|
1600 | <Label check>
|
1601 | <Input type="radio" name="radio2" /> Option two can be something
|
1602 | else and selecting it will deselect option one
|
1603 | </Label>
|
1604 | </FormGroup>
|
1605 | <FormGroup check disabled>
|
1606 | <Label check>
|
1607 | <Input type="radio" name="radio2" disabled /> Option three is
|
1608 | disabled
|
1609 | </Label>
|
1610 | </FormGroup>
|
1611 | </Col>
|
1612 | </FormGroup>
|
1613 | <FormGroup row>
|
1614 | <Label for="checkbox2" sm={2}>
|
1615 | Checkbox
|
1616 | </Label>
|
1617 | <Col sm={{ size: 10 }}>
|
1618 | <FormGroup check>
|
1619 | <Label check>
|
1620 | <Input type="checkbox" id="checkbox2" /> Check me out
|
1621 | </Label>
|
1622 | </FormGroup>
|
1623 | </Col>
|
1624 | </FormGroup>
|
1625 | <FormGroup check row>
|
1626 | <Col sm={{ size: 10, offset: 2 }}>
|
1627 | <Button>Submit</Button>
|
1628 | </Col>
|
1629 | </FormGroup>
|
1630 | </Form>
|
1631 | );
|
1632 | }
|
1633 | }
|
1634 |
|
1635 | class Example47 extends React.Component {
|
1636 | render() {
|
1637 | return (
|
1638 | <Form>
|
1639 | <FormGroup>
|
1640 | <Label for="exampleEmail">Email</Label>{' '}
|
1641 | <Input
|
1642 | type="email"
|
1643 | name="email"
|
1644 | id="exampleEmail"
|
1645 | placeholder="something@idk.cool"
|
1646 | />
|
1647 | </FormGroup>{' '}
|
1648 | <FormGroup>
|
1649 | <Label for="examplePassword">Password</Label>{' '}
|
1650 | <Input
|
1651 | type="password"
|
1652 | name="password"
|
1653 | id="examplePassword"
|
1654 | placeholder="don't tell!"
|
1655 | />
|
1656 | </FormGroup>{' '}
|
1657 | <Button>Submit</Button>
|
1658 | </Form>
|
1659 | );
|
1660 | }
|
1661 | }
|
1662 |
|
1663 | class Example48 extends React.Component {
|
1664 | render() {
|
1665 | return (
|
1666 | <Form>
|
1667 | <FormGroup color="success">
|
1668 | <Label for="exampleEmail">Input with success</Label>
|
1669 | <Input state="success" />
|
1670 | <FormFeedback>Success! You did it!</FormFeedback>
|
1671 | <FormText color="muted">
|
1672 | Example help text that remains unchanged.
|
1673 | </FormText>
|
1674 | </FormGroup>
|
1675 | <FormGroup color="warning">
|
1676 | <Label for="examplePassword">Input with warning</Label>
|
1677 | <Input state="warning" />
|
1678 | <FormFeedback>
|
1679 | Whoops, check your formatting and try again.
|
1680 | </FormFeedback>
|
1681 | <FormText color="muted">
|
1682 | Example help text that remains unchanged.
|
1683 | </FormText>
|
1684 | </FormGroup>
|
1685 | <FormGroup color="danger">
|
1686 | <Label for="examplePassword">Input with danger</Label>
|
1687 | <Input state="danger" />
|
1688 | <FormFeedback>Oh noes! that name is already taken</FormFeedback>
|
1689 | <FormText color="muted">
|
1690 | Example help text that remains unchanged.
|
1691 | </FormText>
|
1692 | </FormGroup>
|
1693 | </Form>
|
1694 | );
|
1695 | }
|
1696 | }
|
1697 |
|
1698 | class Example49 extends React.Component {
|
1699 | render() {
|
1700 | return (
|
1701 | <Form>
|
1702 | <FormGroup>
|
1703 | <Label for="exampleEmail">Static</Label>
|
1704 | <Input>Some static value</Input>
|
1705 | </FormGroup>
|
1706 | <FormGroup>
|
1707 | <Label for="exampleEmail">Email</Label>
|
1708 | <Input
|
1709 | type="email"
|
1710 | name="email"
|
1711 | id="exampleEmail"
|
1712 | placeholder="with a placeholder"
|
1713 | />
|
1714 | </FormGroup>
|
1715 | <FormGroup>
|
1716 | <Label for="examplePassword">Password</Label>
|
1717 | <Input
|
1718 | type="password"
|
1719 | name="password"
|
1720 | id="examplePassword"
|
1721 | placeholder="password placeholder"
|
1722 | />
|
1723 | </FormGroup>
|
1724 | <FormGroup>
|
1725 | <Label for="exampleUrl">Url</Label>
|
1726 | <Input
|
1727 | type="url"
|
1728 | name="url"
|
1729 | id="exampleUrl"
|
1730 | placeholder="url placeholder"
|
1731 | />
|
1732 | </FormGroup>
|
1733 | <FormGroup>
|
1734 | <Label for="exampleNumber">Number</Label>
|
1735 | <Input
|
1736 | type="number"
|
1737 | name="number"
|
1738 | id="exampleNumber"
|
1739 | placeholder="number placeholder"
|
1740 | />
|
1741 | </FormGroup>
|
1742 | <FormGroup>
|
1743 | <Label for="exampleDatetime">Datetime</Label>
|
1744 | <Input
|
1745 | type="datetime"
|
1746 | name="datetime"
|
1747 | id="exampleDatetime"
|
1748 | placeholder="datetime placeholder"
|
1749 | />
|
1750 | </FormGroup>
|
1751 | <FormGroup>
|
1752 | <Label for="exampleDate">Date</Label>
|
1753 | <Input
|
1754 | type="date"
|
1755 | name="date"
|
1756 | id="exampleDate"
|
1757 | placeholder="date placeholder"
|
1758 | />
|
1759 | </FormGroup>
|
1760 | <FormGroup>
|
1761 | <Label for="exampleTime">Time</Label>
|
1762 | <Input
|
1763 | type="time"
|
1764 | name="time"
|
1765 | id="exampleTime"
|
1766 | placeholder="time placeholder"
|
1767 | />
|
1768 | </FormGroup>
|
1769 | <FormGroup>
|
1770 | <Label for="exampleColor">Color</Label>
|
1771 | <Input
|
1772 | type="color"
|
1773 | name="color"
|
1774 | id="exampleColor"
|
1775 | placeholder="color placeholder"
|
1776 | />
|
1777 | </FormGroup>
|
1778 | <FormGroup>
|
1779 | <Label for="exampleSearch">Search</Label>
|
1780 | <Input
|
1781 | type="search"
|
1782 | name="search"
|
1783 | id="exampleSearch"
|
1784 | placeholder="search placeholder"
|
1785 | />
|
1786 | </FormGroup>
|
1787 | <FormGroup>
|
1788 | <Label for="exampleSelect">Select</Label>
|
1789 | <Input type="select" name="select" id="exampleSelect">
|
1790 | <option>1</option>
|
1791 | <option>2</option>
|
1792 | <option>3</option>
|
1793 | <option>4</option>
|
1794 | <option>5</option>
|
1795 | </Input>
|
1796 | </FormGroup>
|
1797 | <FormGroup>
|
1798 | <Label for="exampleSelectMulti">Select Multiple</Label>
|
1799 | <Input
|
1800 | type="select"
|
1801 | name="selectMulti"
|
1802 | id="exampleSelectMulti"
|
1803 | multiple
|
1804 | >
|
1805 | <option>1</option>
|
1806 | <option>2</option>
|
1807 | <option>3</option>
|
1808 | <option>4</option>
|
1809 | <option>5</option>
|
1810 | </Input>
|
1811 | </FormGroup>
|
1812 | <FormGroup>
|
1813 | <Label for="exampleText">Text Area</Label>
|
1814 | <Input type="textarea" name="text" id="exampleText" />
|
1815 | </FormGroup>
|
1816 | <FormGroup>
|
1817 | <Label for="exampleFile">File</Label>
|
1818 | <Input type="file" name="file" id="exampleFile" />
|
1819 | <FormText color="muted">
|
1820 | This is some placeholder block-level help text for the above input.
|
1821 | It's a bit lighter and easily wraps to a new line.
|
1822 | </FormText>
|
1823 | </FormGroup>
|
1824 | <FormGroup check>
|
1825 | <Label check>
|
1826 | <Input type="radio" /> Option one is this and that—be sure to
|
1827 | include why it's great
|
1828 | </Label>
|
1829 | </FormGroup>
|
1830 | <FormGroup check>
|
1831 | <Label check>
|
1832 | <Input type="checkbox" /> Check me out
|
1833 | </Label>
|
1834 | </FormGroup>
|
1835 | </Form>
|
1836 | );
|
1837 | }
|
1838 | }
|
1839 |
|
1840 | class Example50 extends React.Component {
|
1841 | render() {
|
1842 | return (
|
1843 | <Form>
|
1844 | <Input placeholder="lg" bsSize="lg" />
|
1845 | <Input placeholder="default" />
|
1846 | <Input placeholder="sm" bsSize="sm" />
|
1847 | <Input type="select" bsSize="lg">
|
1848 | <option>Large Select</option>
|
1849 | </Input>
|
1850 | <Input type="select">
|
1851 | <option>Default Select</option>
|
1852 | </Input>
|
1853 | <Input type="select" bsSize="sm">
|
1854 | <option>Small Select</option>
|
1855 | </Input>
|
1856 | </Form>
|
1857 | );
|
1858 | }
|
1859 | }
|
1860 |
|
1861 | class Example51 extends React.Component {
|
1862 | render() {
|
1863 | return (
|
1864 | <Form>
|
1865 | <FormGroup>
|
1866 | <Label for="exampleEmail" hidden>
|
1867 | Email
|
1868 | </Label>
|
1869 | <Input
|
1870 | type="email"
|
1871 | name="email"
|
1872 | id="exampleEmail"
|
1873 | placeholder="Email"
|
1874 | />
|
1875 | </FormGroup>{' '}
|
1876 | <FormGroup>
|
1877 | <Label for="examplePassword" hidden>
|
1878 | Password
|
1879 | </Label>
|
1880 | <Input
|
1881 | type="password"
|
1882 | name="password"
|
1883 | id="examplePassword"
|
1884 | placeholder="Password"
|
1885 | />
|
1886 | </FormGroup>{' '}
|
1887 | <Button>Submit</Button>
|
1888 | </Form>
|
1889 | );
|
1890 | }
|
1891 | }
|
1892 |
|
1893 | const Example52 = (props: any) => {
|
1894 | return (
|
1895 | <div>
|
1896 | <InputGroup>
|
1897 | <InputGroupText>@</InputGroupText>
|
1898 | <Input placeholder="username" />
|
1899 | </InputGroup>
|
1900 | <br />
|
1901 | <InputGroup>
|
1902 | <InputGroupText>
|
1903 | <Input
|
1904 | addon
|
1905 | type="checkbox"
|
1906 | aria-label="Checkbox for following text input"
|
1907 | />
|
1908 | </InputGroupText>
|
1909 | <Input placeholder="Check it out" />
|
1910 | </InputGroup>
|
1911 | <br />
|
1912 | <InputGroup>
|
1913 | <Input placeholder="username" />
|
1914 | <InputGroupText>@example.com</InputGroupText>
|
1915 | </InputGroup>
|
1916 | <br />
|
1917 | <InputGroup>
|
1918 | <InputGroupText>$</InputGroupText>
|
1919 | <InputGroupText>$</InputGroupText>
|
1920 | <Input placeholder="Dolla dolla billz yo!" />
|
1921 | <InputGroupText>$</InputGroupText>
|
1922 | <InputGroupText>$</InputGroupText>
|
1923 | </InputGroup>
|
1924 | <br />
|
1925 | <InputGroup>
|
1926 | <InputGroupText>$</InputGroupText>
|
1927 | <Input placeholder="Amount" type="number" step="1" />
|
1928 | <InputGroupText>.00</InputGroupText>
|
1929 | </InputGroup>
|
1930 | </div>
|
1931 | );
|
1932 | };
|
1933 |
|
1934 | const Example53 = (props: any) => {
|
1935 | return (
|
1936 | <div>
|
1937 | <InputGroup>
|
1938 | <InputGroupText>To the Left!</InputGroupText>
|
1939 | <Input />
|
1940 | </InputGroup>
|
1941 | <br />
|
1942 | <InputGroup>
|
1943 | <Input />
|
1944 | <InputGroupText>To the Right!</InputGroupText>
|
1945 | </InputGroup>
|
1946 | <br />
|
1947 | <InputGroup>
|
1948 | <InputGroupText>To the Left!</InputGroupText>
|
1949 | <Input placeholder="and..." />
|
1950 | <InputGroupText>To the Right!</InputGroupText>
|
1951 | </InputGroup>
|
1952 | </div>
|
1953 | );
|
1954 | };
|
1955 |
|
1956 | const Example54 = (props: any) => {
|
1957 | return (
|
1958 | <div>
|
1959 | <InputGroup size="lg">
|
1960 | <InputGroupText>@lg</InputGroupText>
|
1961 | <Input />
|
1962 | </InputGroup>
|
1963 | <br />
|
1964 | <InputGroup>
|
1965 | <InputGroupText>@normal</InputGroupText>
|
1966 | <Input />
|
1967 | </InputGroup>
|
1968 | <br />
|
1969 | <InputGroup size="sm">
|
1970 | <InputGroupText>@sm</InputGroupText>
|
1971 | <Input />
|
1972 | </InputGroup>
|
1973 | </div>
|
1974 | );
|
1975 | };
|
1976 |
|
1977 | const Example55 = (props: any) => {
|
1978 | return (
|
1979 | <div>
|
1980 | <InputGroup>
|
1981 | <Button>I'm a button</Button>
|
1982 | <Input />
|
1983 | </InputGroup>
|
1984 | <br />
|
1985 | <InputGroup>
|
1986 | <Input />
|
1987 | </InputGroup>
|
1988 | <br />
|
1989 | <InputGroup>
|
1990 | <Input placeholder="and..." />
|
1991 | <Button color="secondary">I'm a button</Button>
|
1992 | </InputGroup>
|
1993 | </div>
|
1994 | );
|
1995 | };
|
1996 |
|
1997 | const Example56 = (props: any) => {
|
1998 | return (
|
1999 | <div>
|
2000 | <InputGroup size="lg">
|
2001 | <InputGroupText>@lg</InputGroupText>
|
2002 | <Input />
|
2003 | </InputGroup>
|
2004 | <br />
|
2005 | <InputGroup>
|
2006 | <InputGroupText>@normal</InputGroupText>
|
2007 | <Input />
|
2008 | </InputGroup>
|
2009 | <br />
|
2010 | <InputGroup size="sm">
|
2011 | <InputGroupText>@sm</InputGroupText>
|
2012 | <Input />
|
2013 | </InputGroup>
|
2014 | </div>
|
2015 | );
|
2016 | };
|
2017 |
|
2018 | const Example57 = (props: any) => {
|
2019 | return (
|
2020 | <div>
|
2021 | <InputGroup>
|
2022 | <Button>I'm a button</Button>
|
2023 | <Input />
|
2024 | </InputGroup>
|
2025 | <br />
|
2026 | <InputGroup>
|
2027 | <Input />
|
2028 | </InputGroup>
|
2029 | <br />
|
2030 | <InputGroup>
|
2031 | <Input placeholder="and..." />
|
2032 | <Button color="secondary">I'm a button</Button>
|
2033 | </InputGroup>
|
2034 | </div>
|
2035 | );
|
2036 | };
|
2037 |
|
2038 | const Example58 = (props: any) => {
|
2039 | return (
|
2040 | <div>
|
2041 | <InputGroup>
|
2042 | <InputGroupText>To the Left!</InputGroupText>
|
2043 | <Input />
|
2044 | </InputGroup>
|
2045 | <br />
|
2046 | <InputGroup>
|
2047 | <Input />
|
2048 | <InputGroupText color="secondary">
|
2049 | To the Right!
|
2050 | </InputGroupText>
|
2051 | </InputGroup>
|
2052 | <br />
|
2053 | <InputGroup>
|
2054 | <InputGroupText color="danger">
|
2055 | To the Left!
|
2056 | </InputGroupText>
|
2057 | <Input placeholder="and..." />
|
2058 | <InputGroupText color="success">
|
2059 | To the Right!
|
2060 | </InputGroupText>
|
2061 | </InputGroup>
|
2062 | </div>
|
2063 | );
|
2064 | };
|
2065 |
|
2066 | class Example61 extends React.Component {
|
2067 | render() {
|
2068 | return (
|
2069 | <Container>
|
2070 | <Row>
|
2071 | <Col>.col</Col>
|
2072 | </Row>
|
2073 | <Row>
|
2074 | <Col>.col</Col>
|
2075 | <Col>.col</Col>
|
2076 | <Col>.col</Col>
|
2077 | <Col>.col</Col>
|
2078 | </Row>
|
2079 | <Row>
|
2080 | <Col xs="3">.col-3</Col>
|
2081 | <Col xs="auto">.col-auto - variable width content</Col>
|
2082 | <Col xs="3">.col-3</Col>
|
2083 | </Row>
|
2084 | <Row>
|
2085 | <Col xs="6">.col-6</Col>
|
2086 | <Col xs="6">.col-6</Col>
|
2087 | </Row>
|
2088 | <Row>
|
2089 | <Col xs="6" sm="4">
|
2090 | .col-6 .col-sm-4
|
2091 | </Col>
|
2092 | <Col xs="6" sm="4">
|
2093 | .col-6 .col-sm-4
|
2094 | </Col>
|
2095 | <Col sm="4">.col .col-sm-4</Col>
|
2096 | </Row>
|
2097 | <Row>
|
2098 | <Col sm={{ size: 6, offset: 1 }}>.col .col-sm-6 .col-sm-offset-2</Col>
|
2099 | </Row>
|
2100 | <Row>
|
2101 | <Col sm="12" md={{ size: 8, offset: 2 }}>
|
2102 | .col .col-sm-12 .col-md-6 .col-md-offset-3
|
2103 | </Col>
|
2104 | </Row>
|
2105 | <Row>
|
2106 | <Col sm={{ size: 'auto', offset: 1 }}>
|
2107 | .col .col-sm .col-sm-offset-1
|
2108 | </Col>
|
2109 | <Col sm={{ size: 'auto', offset: 1 }}>
|
2110 | .col .col-sm .col-sm-offset-1
|
2111 | </Col>
|
2112 | </Row>
|
2113 | </Container>
|
2114 | );
|
2115 | }
|
2116 | }
|
2117 |
|
2118 | const ExampleResponsiveContainer = (props: any) => {
|
2119 | return (
|
2120 | <>
|
2121 | <Container className="themed-container">.container</Container>
|
2122 | <Container className="themed-container" fluid="sm">
|
2123 | .container-sm
|
2124 | </Container>
|
2125 | <Container className="themed-container" fluid="md">
|
2126 | .container-md
|
2127 | </Container>
|
2128 | <Container className="themed-container" fluid="lg">
|
2129 | .container-lg
|
2130 | </Container>
|
2131 | <Container className="themed-container" fluid="xl">
|
2132 | .container-xl
|
2133 | </Container>
|
2134 | <Container className="themed-container" fluid="xxl">
|
2135 | .container-xxl
|
2136 | </Container>
|
2137 | <Container className="themed-container" fluid={true}>
|
2138 | .container-fluid
|
2139 | </Container>
|
2140 | </>
|
2141 | );
|
2142 | };
|
2143 |
|
2144 | const ExampleRowColumns = (props: any) => {
|
2145 | return (
|
2146 | <Container>
|
2147 | <Row xs="2">
|
2148 | <Col>Column</Col>
|
2149 | <Col>Column</Col>
|
2150 | <Col>Column</Col>
|
2151 | <Col>Column</Col>
|
2152 | </Row>
|
2153 | <Row xs="3">
|
2154 | <Col>Column</Col>
|
2155 | <Col>Column</Col>
|
2156 | <Col>Column</Col>
|
2157 | <Col>Column</Col>
|
2158 | </Row>
|
2159 | <Row xs="4">
|
2160 | <Col>Column</Col>
|
2161 | <Col>Column</Col>
|
2162 | <Col>Column</Col>
|
2163 | <Col>Column</Col>
|
2164 | </Row>
|
2165 | <Row xs="4">
|
2166 | <Col>Column</Col>
|
2167 | <Col>Column</Col>
|
2168 | <Col xs="6">Column</Col>
|
2169 | <Col>Column</Col>
|
2170 | </Row>
|
2171 | <Row xs="1" sm="2" md="4">
|
2172 | <Col>Column</Col>
|
2173 | <Col>Column</Col>
|
2174 | <Col>Column</Col>
|
2175 | <Col>Column</Col>
|
2176 | </Row>
|
2177 | </Container>
|
2178 | );
|
2179 | };
|
2180 |
|
2181 | class Example62 extends React.Component {
|
2182 | render() {
|
2183 | return (
|
2184 | <ListGroup>
|
2185 | <ListGroupItem>Cras justo odio</ListGroupItem>
|
2186 | <ListGroupItem>Dapibus ac facilisis in</ListGroupItem>
|
2187 | <ListGroupItem>Morbi leo risus</ListGroupItem>
|
2188 | <ListGroupItem>Porta ac consectetur ac</ListGroupItem>
|
2189 | <ListGroupItem>Vestibulum at eros</ListGroupItem>
|
2190 | </ListGroup>
|
2191 | );
|
2192 | }
|
2193 | }
|
2194 |
|
2195 | class Example63 extends React.Component {
|
2196 | render() {
|
2197 | return (
|
2198 | <ListGroup>
|
2199 | <ListGroupItem className="justify-content-between">
|
2200 | Cras justo odio <Badge pill>14</Badge>
|
2201 | </ListGroupItem>
|
2202 | <ListGroupItem className="justify-content-between">
|
2203 | Dapibus ac facilisis in <Badge pill>2</Badge>
|
2204 | </ListGroupItem>
|
2205 | <ListGroupItem className="justify-content-between">
|
2206 | Morbi leo risus <Badge pill>1</Badge>
|
2207 | </ListGroupItem>
|
2208 | </ListGroup>
|
2209 | );
|
2210 | }
|
2211 | }
|
2212 |
|
2213 | class Example64 extends React.Component {
|
2214 | render() {
|
2215 | return (
|
2216 | <ListGroup>
|
2217 | <ListGroupItem disabled tag="a" href="#">
|
2218 | Cras justo odio
|
2219 | </ListGroupItem>
|
2220 | <ListGroupItem tag="a" href="#">
|
2221 | Dapibus ac facilisis in
|
2222 | </ListGroupItem>
|
2223 | <ListGroupItem tag="a" href="#">
|
2224 | Morbi leo risus
|
2225 | </ListGroupItem>
|
2226 | <ListGroupItem tag="a" href="#">
|
2227 | Porta ac consectetur ac
|
2228 | </ListGroupItem>
|
2229 | <ListGroupItem tag="a" href="#">
|
2230 | Vestibulum at eros
|
2231 | </ListGroupItem>
|
2232 | </ListGroup>
|
2233 | );
|
2234 | }
|
2235 | }
|
2236 |
|
2237 | class Example65 extends React.Component {
|
2238 | render() {
|
2239 | return (
|
2240 | <div>
|
2241 | <h3>Anchors </h3>
|
2242 | <p>
|
2243 | Be sure to{' '}
|
2244 | <strong>
|
2245 | not use the standard <code>.btn</code> classes here
|
2246 | </strong>
|
2247 | .
|
2248 | </p>
|
2249 | <ListGroup>
|
2250 | <ListGroupItem active tag="a" href="#" action>
|
2251 | Cras justo odio
|
2252 | </ListGroupItem>
|
2253 | <ListGroupItem tag="a" href="#" action>
|
2254 | Dapibus ac facilisis in
|
2255 | </ListGroupItem>
|
2256 | <ListGroupItem tag="a" href="#" action>
|
2257 | Morbi leo risus
|
2258 | </ListGroupItem>
|
2259 | <ListGroupItem tag="a" href="#" action>
|
2260 | Porta ac consectetur ac
|
2261 | </ListGroupItem>
|
2262 | <ListGroupItem disabled tag="a" href="#" action>
|
2263 | Vestibulum at eros
|
2264 | </ListGroupItem>
|
2265 | </ListGroup>
|
2266 | <p />
|
2267 | <h3>Buttons </h3>
|
2268 | <ListGroup>
|
2269 | <ListGroupItem active tag="button" action>
|
2270 | Cras justo odio
|
2271 | </ListGroupItem>
|
2272 | <ListGroupItem tag="button" action>
|
2273 | Dapibus ac facilisis in
|
2274 | </ListGroupItem>
|
2275 | <ListGroupItem tag="button" action>
|
2276 | Morbi leo risus
|
2277 | </ListGroupItem>
|
2278 | <ListGroupItem tag="button" action>
|
2279 | Porta ac consectetur ac
|
2280 | </ListGroupItem>
|
2281 | <ListGroupItem disabled tag="button" action>
|
2282 | Vestibulum at eros
|
2283 | </ListGroupItem>
|
2284 | </ListGroup>
|
2285 | </div>
|
2286 | );
|
2287 | }
|
2288 | }
|
2289 |
|
2290 | class Example66 extends React.Component {
|
2291 | render() {
|
2292 | return (
|
2293 | <ListGroup>
|
2294 | <ListGroupItem color="success">Cras justo odio</ListGroupItem>
|
2295 | <ListGroupItem color="info">Dapibus ac facilisis in</ListGroupItem>
|
2296 | <ListGroupItem color="warning">Morbi leo risus</ListGroupItem>
|
2297 | <ListGroupItem color="danger">Porta ac consectetur ac</ListGroupItem>
|
2298 | </ListGroup>
|
2299 | );
|
2300 | }
|
2301 | }
|
2302 |
|
2303 | class Example67 extends React.Component {
|
2304 | render() {
|
2305 | return (
|
2306 | <ListGroup>
|
2307 | <ListGroupItem active>
|
2308 | <ListGroupItemHeading>List group item heading</ListGroupItemHeading>
|
2309 | <ListGroupItemText>
|
2310 | Donec id elit non mi porta gravida at eget metus. Maecenas sed diam
|
2311 | eget risus varius blandit.
|
2312 | </ListGroupItemText>
|
2313 | </ListGroupItem>
|
2314 | <ListGroupItem>
|
2315 | <ListGroupItemHeading>List group item heading</ListGroupItemHeading>
|
2316 | <ListGroupItemText>
|
2317 | Donec id elit non mi porta gravida at eget metus. Maecenas sed diam
|
2318 | eget risus varius blandit.
|
2319 | </ListGroupItemText>
|
2320 | </ListGroupItem>
|
2321 | <ListGroupItem>
|
2322 | <ListGroupItemHeading>List group item heading</ListGroupItemHeading>
|
2323 | <ListGroupItemText>
|
2324 | Donec id elit non mi porta gravida at eget metus. Maecenas sed diam
|
2325 | eget risus varius blandit.
|
2326 | </ListGroupItemText>
|
2327 | </ListGroupItem>
|
2328 | </ListGroup>
|
2329 | );
|
2330 | }
|
2331 | }
|
2332 |
|
2333 | const ExampleListGroupFlush = (props: any) => {
|
2334 | return (
|
2335 | <ListGroup flush>
|
2336 | <ListGroupItem disabled tag="a" href="#">
|
2337 | Cras justo odio
|
2338 | </ListGroupItem>
|
2339 | <ListGroupItem tag="a" href="#">
|
2340 | Dapibus ac facilisis in
|
2341 | </ListGroupItem>
|
2342 | <ListGroupItem tag="a" href="#">
|
2343 | Morbi leo risus
|
2344 | </ListGroupItem>
|
2345 | <ListGroupItem tag="a" href="#">
|
2346 | Porta ac consectetur ac
|
2347 | </ListGroupItem>
|
2348 | <ListGroupItem tag="a" href="#">
|
2349 | Vestibulum at eros
|
2350 | </ListGroupItem>
|
2351 | </ListGroup>
|
2352 | );
|
2353 | };
|
2354 |
|
2355 | const ExampleListGroupHorizontal = (props: any) => {
|
2356 | return (
|
2357 | <div>
|
2358 | <p>
|
2359 | The <code>horizontal</code> prop can be a Boolean or a string specifying
|
2360 | one of Bootstrap's breakpoints
|
2361 | </p>
|
2362 | <ListGroup horizontal>
|
2363 | <ListGroupItem tag="a" href="#">
|
2364 | Cras justo odio
|
2365 | </ListGroupItem>
|
2366 | <ListGroupItem tag="a" href="#">
|
2367 | Dapibus ac facilisis in
|
2368 | </ListGroupItem>
|
2369 | <ListGroupItem tag="a" href="#">
|
2370 | Morbi leo risus
|
2371 | </ListGroupItem>
|
2372 | <ListGroupItem tag="a" href="#">
|
2373 | Porta ac consectetur ac
|
2374 | </ListGroupItem>
|
2375 | <ListGroupItem tag="a" href="#">
|
2376 | Vestibulum at eros
|
2377 | </ListGroupItem>
|
2378 | </ListGroup>
|
2379 | <p className="mt-3">
|
2380 | This list group is horizontal at the <code>lg</code> breakpoint and up.
|
2381 | </p>
|
2382 | <ListGroup horizontal="lg">
|
2383 | <ListGroupItem tag="a" href="#">
|
2384 | Cras justo odio
|
2385 | </ListGroupItem>
|
2386 | <ListGroupItem tag="a" href="#">
|
2387 | Dapibus ac facilisis in
|
2388 | </ListGroupItem>
|
2389 | <ListGroupItem tag="a" href="#">
|
2390 | Morbi leo risus
|
2391 | </ListGroupItem>
|
2392 | <ListGroupItem tag="a" href="#">
|
2393 | Porta ac consectetur ac
|
2394 | </ListGroupItem>
|
2395 | <ListGroupItem tag="a" href="#">
|
2396 | Vestibulum at eros
|
2397 | </ListGroupItem>
|
2398 | </ListGroup>
|
2399 | <p className="mt-3">
|
2400 | Note that horizontal list groups cannot be combined with flush list
|
2401 | groups. If <code>flush</code> is <code>true</code> then{' '}
|
2402 | <code>horizontal</code> has no effect.
|
2403 | </p>
|
2404 | </div>
|
2405 | );
|
2406 | };
|
2407 |
|
2408 |
|
2409 | const Example68 = () => {
|
2410 | return (
|
2411 | <Media>
|
2412 | <Media left href="#">
|
2413 | <Media
|
2414 | object
|
2415 | data-src="holder.js/64x64"
|
2416 | alt="Generic placeholder image"
|
2417 | />
|
2418 | </Media>
|
2419 | <Media body>
|
2420 | <Media heading>Media heading</Media>
|
2421 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque
|
2422 | ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at,
|
2423 | tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate
|
2424 | fringilla. Donec lacinia congue felis in faucibus.
|
2425 | </Media>
|
2426 | </Media>
|
2427 | );
|
2428 | };
|
2429 |
|
2430 | const Example69 = () => {
|
2431 | return (
|
2432 | <Media>
|
2433 | <Media left href="#">
|
2434 | <Media
|
2435 | object
|
2436 | data-src="holder.js/64x64"
|
2437 | alt="Generic placeholder image"
|
2438 | />
|
2439 | </Media>
|
2440 | <Media body>
|
2441 | <Media heading>Media heading</Media>
|
2442 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque
|
2443 | ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at,
|
2444 | tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate
|
2445 | fringilla. Donec lacinia congue felis in faucibus.
|
2446 | <Media>
|
2447 | <Media left href="#">
|
2448 | <Media
|
2449 | object
|
2450 | data-src="holder.js/64x64"
|
2451 | alt="Generic placeholder image"
|
2452 | />
|
2453 | </Media>
|
2454 | <Media body>
|
2455 | <Media heading>Nested media heading</Media>
|
2456 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus
|
2457 | scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum
|
2458 | in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac
|
2459 | nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
2460 | </Media>
|
2461 | </Media>
|
2462 | </Media>
|
2463 | </Media>
|
2464 | );
|
2465 | };
|
2466 |
|
2467 | const Example70 = () => {
|
2468 | return (
|
2469 | <div>
|
2470 | <Media>
|
2471 | <Media left top href="#">
|
2472 | <Media
|
2473 | object
|
2474 | data-src="holder.js/64x64"
|
2475 | alt="Generic placeholder image"
|
2476 | />
|
2477 | </Media>
|
2478 | <Media body>
|
2479 | <Media heading>Top aligned media</Media>
|
2480 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus
|
2481 | scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in
|
2482 | vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi
|
2483 | vulputate fringilla. Donec lacinia congue felis in faucibus.
|
2484 | </Media>
|
2485 | </Media>
|
2486 | <Media className="mt-1">
|
2487 | <Media left middle href="#">
|
2488 | <Media
|
2489 | object
|
2490 | data-src="holder.js/64x64"
|
2491 | alt="Generic placeholder image"
|
2492 | />
|
2493 | </Media>
|
2494 | <Media body>
|
2495 | <Media heading>Middle aligned media</Media>
|
2496 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus
|
2497 | scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in
|
2498 | vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi
|
2499 | vulputate fringilla. Donec lacinia congue felis in faucibus.
|
2500 | </Media>
|
2501 | </Media>
|
2502 | <Media className="mt-1">
|
2503 | <Media left bottom href="#">
|
2504 | <Media
|
2505 | object
|
2506 | data-src="holder.js/64x64"
|
2507 | alt="Generic placeholder image"
|
2508 | />
|
2509 | </Media>
|
2510 | <Media body>
|
2511 | <Media heading>Bottom aligned media</Media>
|
2512 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus
|
2513 | scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in
|
2514 | vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi
|
2515 | vulputate fringilla. Donec lacinia congue felis in faucibus.
|
2516 | </Media>
|
2517 | </Media>
|
2518 | </div>
|
2519 | );
|
2520 | };
|
2521 |
|
2522 | const Example71 = () => {
|
2523 | return (
|
2524 | <Media list>
|
2525 | <Media tag="li">
|
2526 | <Media left href="#">
|
2527 | <Media
|
2528 | object
|
2529 | data-src="holder.js/64x64"
|
2530 | alt="Generic placeholder image"
|
2531 | />
|
2532 | </Media>
|
2533 | <Media body>
|
2534 | <Media heading>Media heading</Media>
|
2535 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus
|
2536 | scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in
|
2537 | vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi
|
2538 | vulputate fringilla. Donec lacinia congue felis in faucibus.
|
2539 | <Media>
|
2540 | <Media left href="#">
|
2541 | <Media
|
2542 | object
|
2543 | data-src="holder.js/64x64"
|
2544 | alt="Generic placeholder image"
|
2545 | />
|
2546 | </Media>
|
2547 | <Media body>
|
2548 | <Media heading>Nested media heading</Media>
|
2549 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus
|
2550 | scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum
|
2551 | in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac
|
2552 | nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
2553 | <Media>
|
2554 | <Media left href="#">
|
2555 | <Media
|
2556 | object
|
2557 | data-src="holder.js/64x64"
|
2558 | alt="Generic placeholder image"
|
2559 | />
|
2560 | </Media>
|
2561 | <Media body>
|
2562 | <Media heading>Nested media heading</Media>
|
2563 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus
|
2564 | scelerisque ante sollicitudin commodo. Cras purus odio,
|
2565 | vestibulum in vulputate at, tempus viverra turpis. Fusce
|
2566 | condimentum nunc ac nisi vulputate fringilla. Donec lacinia
|
2567 | congue felis in faucibus.
|
2568 | </Media>
|
2569 | </Media>
|
2570 | </Media>
|
2571 | </Media>
|
2572 | <Media>
|
2573 | <Media left href="#">
|
2574 | <Media
|
2575 | object
|
2576 | data-src="holder.js/64x64"
|
2577 | alt="Generic placeholder image"
|
2578 | />
|
2579 | </Media>
|
2580 | <Media body>
|
2581 | <Media heading>Nested media heading</Media>
|
2582 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus
|
2583 | scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum
|
2584 | in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac
|
2585 | nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
2586 | </Media>
|
2587 | </Media>
|
2588 | </Media>
|
2589 | </Media>
|
2590 | <Media tag="li">
|
2591 | <Media body>
|
2592 | <Media heading>Media heading</Media>
|
2593 | Cras sit amet nibh libero, in gravida nulla. Nulla vel metus
|
2594 | scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in
|
2595 | vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi
|
2596 | vulputate fringilla. Donec lacinia congue felis in faucibus.
|
2597 | </Media>
|
2598 | <Media right href="#">
|
2599 | <Media
|
2600 | object
|
2601 | data-src="holder.js/64x64"
|
2602 | alt="Generic placeholder image"
|
2603 | />
|
2604 | </Media>
|
2605 | </Media>
|
2606 | </Media>
|
2607 | );
|
2608 | };
|
2609 |
|
2610 |
|
2611 | class ModalExample72 extends React.Component<any, any> {
|
2612 | state: any;
|
2613 | constructor(props: any) {
|
2614 | super(props);
|
2615 | this.state = {
|
2616 | modal: false,
|
2617 | };
|
2618 |
|
2619 | this.toggle = this.toggle.bind(this);
|
2620 | }
|
2621 |
|
2622 | toggle() {
|
2623 | this.setState({
|
2624 | modal: !this.state.modal,
|
2625 | });
|
2626 | }
|
2627 |
|
2628 | render() {
|
2629 | return (
|
2630 | <div>
|
2631 | <Button color="danger" onClick={this.toggle}>
|
2632 | {this.props.buttonLabel}
|
2633 | </Button>
|
2634 | <Modal
|
2635 | isOpen={this.state.modal}
|
2636 | toggle={this.toggle}
|
2637 | className={this.props.className}
|
2638 | container="#test"
|
2639 | >
|
2640 | <ModalHeader toggle={this.toggle}>Modal title</ModalHeader>
|
2641 | <ModalBody>
|
2642 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
2643 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
|
2644 | ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
2645 | aliquip ex ea commodo consequat. Duis aute irure dolor in
|
2646 | reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
2647 | pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
2648 | culpa qui officia deserunt mollit anim id est laborum.
|
2649 | </ModalBody>
|
2650 | <ModalFooter>
|
2651 | <Button color="primary" onClick={this.toggle}>
|
2652 | Do Something
|
2653 | </Button>{' '}
|
2654 | <Button color="secondary" onClick={this.toggle}>
|
2655 | Cancel
|
2656 | </Button>
|
2657 | </ModalFooter>
|
2658 | </Modal>
|
2659 | </div>
|
2660 | );
|
2661 | }
|
2662 | }
|
2663 |
|
2664 | class ModalExample73 extends React.Component<any, any> {
|
2665 | state: any;
|
2666 | element: HTMLElement;
|
2667 | constructor(props: any) {
|
2668 | super(props);
|
2669 | this.state = {
|
2670 | modal: false,
|
2671 | backdrop: true,
|
2672 | };
|
2673 |
|
2674 | this.toggle = this.toggle.bind(this);
|
2675 | this.changeBackdrop = this.changeBackdrop.bind(this);
|
2676 | }
|
2677 |
|
2678 | toggle() {
|
2679 | this.setState({
|
2680 | modal: !this.state.modal,
|
2681 | });
|
2682 | }
|
2683 |
|
2684 | changeBackdrop(e: React.ChangeEvent<HTMLInputElement>) {
|
2685 | let value = e.target.value;
|
2686 | if (value !== 'static') {
|
2687 | value = JSON.parse(value);
|
2688 | }
|
2689 | this.setState({ backdrop: value });
|
2690 | }
|
2691 |
|
2692 | render() {
|
2693 | return (
|
2694 | <div>
|
2695 | <Form onSubmit={(e) => e.preventDefault()}>
|
2696 | <FormGroup>
|
2697 | <Label for="backdrop">Backdrop value</Label>{' '}
|
2698 | <Input
|
2699 | type="select"
|
2700 | name="backdrop"
|
2701 | id="backdrop"
|
2702 | onChange={this.changeBackdrop}
|
2703 | >
|
2704 | <option value="true">true</option>
|
2705 | <option value="false">false</option>
|
2706 | <option value="static">"static"</option>
|
2707 | </Input>
|
2708 | </FormGroup>{' '}
|
2709 | <Button color="danger" onClick={this.toggle}>
|
2710 | {this.props.buttonLabel}
|
2711 | </Button>
|
2712 | </Form>
|
2713 | <Modal
|
2714 | isOpen={this.state.modal}
|
2715 | toggle={this.toggle}
|
2716 | className={this.props.className}
|
2717 | backdrop={this.state.backdrop}
|
2718 | container={this.element}
|
2719 | >
|
2720 | <ModalHeader toggle={this.toggle}>Modal title</ModalHeader>
|
2721 | <ModalBody>
|
2722 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
2723 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
|
2724 | ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
2725 | aliquip ex ea commodo consequat. Duis aute irure dolor in
|
2726 | reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
2727 | pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
2728 | culpa qui officia deserunt mollit anim id est laborum.
|
2729 | </ModalBody>
|
2730 | <ModalFooter>
|
2731 | <Button color="primary" onClick={this.toggle}>
|
2732 | Do Something
|
2733 | </Button>{' '}
|
2734 | <Button color="secondary" onClick={this.toggle}>
|
2735 | Cancel
|
2736 | </Button>
|
2737 | </ModalFooter>
|
2738 | </Modal>
|
2739 | </div>
|
2740 | );
|
2741 | }
|
2742 | }
|
2743 |
|
2744 | class ModalExample74 extends React.Component<any, any> {
|
2745 | state: any;
|
2746 | constructor(props: any) {
|
2747 | super(props);
|
2748 | this.state = {
|
2749 | modal: false,
|
2750 | nestedModal: false,
|
2751 | };
|
2752 |
|
2753 | this.toggle = this.toggle.bind(this);
|
2754 | this.toggleNested = this.toggleNested.bind(this);
|
2755 | }
|
2756 |
|
2757 | toggle() {
|
2758 | this.setState({
|
2759 | modal: !this.state.modal,
|
2760 | });
|
2761 | }
|
2762 |
|
2763 | toggleNested() {
|
2764 | this.setState({
|
2765 | nestedModal: !this.state.nestedModal,
|
2766 | });
|
2767 | }
|
2768 |
|
2769 | render() {
|
2770 | return (
|
2771 | <div>
|
2772 | <Button color="danger" onClick={this.toggle}>
|
2773 | {this.props.buttonLabel}
|
2774 | </Button>
|
2775 | <Modal
|
2776 | isOpen={this.state.modal}
|
2777 | toggle={this.toggle}
|
2778 | className={this.props.className}
|
2779 | >
|
2780 | <ModalHeader toggle={this.toggle}>Modal title</ModalHeader>
|
2781 | <ModalBody>
|
2782 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
2783 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
|
2784 | ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
2785 | aliquip ex ea commodo consequat. Duis aute irure dolor in
|
2786 | reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
2787 | pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
2788 | culpa qui officia deserunt mollit anim id est laborum.
|
2789 | <br />
|
2790 | <Button color="success" onClick={this.toggleNested}>
|
2791 | Show Nested Model
|
2792 | </Button>
|
2793 | <Modal isOpen={this.state.nestedModal} toggle={this.toggleNested}>
|
2794 | <ModalHeader>Nested Modal title</ModalHeader>
|
2795 | <ModalBody>Stuff and things</ModalBody>
|
2796 | <ModalFooter>
|
2797 | <Button color="primary" onClick={this.toggleNested}>
|
2798 | Done
|
2799 | </Button>{' '}
|
2800 | <Button color="secondary" onClick={this.toggle}>
|
2801 | All Done
|
2802 | </Button>
|
2803 | </ModalFooter>
|
2804 | </Modal>
|
2805 | </ModalBody>
|
2806 | <ModalFooter>
|
2807 | <Button color="primary" onClick={this.toggle}>
|
2808 | Do Something
|
2809 | </Button>{' '}
|
2810 | <Button color="secondary" onClick={this.toggle}>
|
2811 | Cancel
|
2812 | </Button>
|
2813 | </ModalFooter>
|
2814 | </Modal>
|
2815 | </div>
|
2816 | );
|
2817 | }
|
2818 | }
|
2819 |
|
2820 | class ModalExampleDestructuring extends React.Component<any, any> {
|
2821 | constructor(props: any) {
|
2822 | super(props);
|
2823 | this.state = {
|
2824 | modal: false,
|
2825 | unmountOnClose: true,
|
2826 | };
|
2827 |
|
2828 | this.toggle = this.toggle.bind(this);
|
2829 | this.changeUnmountOnClose = this.changeUnmountOnClose.bind(this);
|
2830 | }
|
2831 |
|
2832 | toggle() {
|
2833 | this.setState((prevState: any) => ({
|
2834 | modal: !prevState.modal,
|
2835 | }));
|
2836 | }
|
2837 |
|
2838 | changeUnmountOnClose(e: React.ChangeEvent<HTMLInputElement>) {
|
2839 | const value = e.target.value;
|
2840 | this.setState({ unmountOnClose: JSON.parse(value) });
|
2841 | }
|
2842 |
|
2843 | render() {
|
2844 | return (
|
2845 | <div>
|
2846 | <Form onSubmit={(e) => e.preventDefault()}>
|
2847 | <FormGroup>
|
2848 | <Label for="unmountOnClose">UnmountOnClose value</Label>{' '}
|
2849 | <Input
|
2850 | type="select"
|
2851 | name="unmountOnClose"
|
2852 | id="unmountOnClose"
|
2853 | onChange={this.changeUnmountOnClose}
|
2854 | >
|
2855 | <option value="true">true</option>
|
2856 | <option value="false">false</option>
|
2857 | </Input>
|
2858 | </FormGroup>{' '}
|
2859 | <Button color="danger" onClick={this.toggle}>
|
2860 | {this.props.buttonLabel}
|
2861 | </Button>
|
2862 | </Form>
|
2863 | <Modal
|
2864 | isOpen={this.state.modal}
|
2865 | toggle={this.toggle}
|
2866 | className={this.props.className}
|
2867 | unmountOnClose={this.state.unmountOnClose}
|
2868 | scrollable
|
2869 | >
|
2870 | <ModalHeader toggle={this.toggle}>Modal title</ModalHeader>
|
2871 | <ModalBody>
|
2872 | <Input
|
2873 | type="textarea"
|
2874 | placeholder="Write something (data should remain in modal if unmountOnClose is set to false)"
|
2875 | rows={5}
|
2876 | />
|
2877 | </ModalBody>
|
2878 | <ModalFooter>
|
2879 | <Button color="primary" onClick={this.toggle}>
|
2880 | Do Something
|
2881 | </Button>{' '}
|
2882 | <Button color="secondary" onClick={this.toggle}>
|
2883 | Cancel
|
2884 | </Button>
|
2885 | </ModalFooter>
|
2886 | </Modal>
|
2887 | </div>
|
2888 | );
|
2889 | }
|
2890 | }
|
2891 |
|
2892 | class ModalExampleFocusAfterClose extends React.Component<any, any> {
|
2893 | constructor(props: any) {
|
2894 | super(props);
|
2895 | this.state = {
|
2896 | open: false,
|
2897 | focusAfterClose: true,
|
2898 | };
|
2899 | this.toggle = this.toggle.bind(this);
|
2900 | this.handleSelectChange = this.handleSelectChange.bind(this);
|
2901 | }
|
2902 |
|
2903 | toggle() {
|
2904 | this.setState({ open: !this.state.open });
|
2905 | }
|
2906 |
|
2907 | handleSelectChange(e: React.ChangeEvent<HTMLInputElement>) {
|
2908 | const value = e.target.value;
|
2909 | this.setState({ focusAfterClose: JSON.parse(value) });
|
2910 | }
|
2911 |
|
2912 | render() {
|
2913 | return (
|
2914 | <div>
|
2915 | <Form onSubmit={(e) => e.preventDefault()}>
|
2916 | <FormGroup>
|
2917 | <Label for="focusAfterClose">Focus After Close</Label>
|
2918 | <Input
|
2919 | className="mx-2"
|
2920 | type="select"
|
2921 | id="focusAfterClose"
|
2922 | onChange={this.handleSelectChange}
|
2923 | >
|
2924 | <option value="true">Yes</option>
|
2925 | <option value="false">No</option>
|
2926 | </Input>
|
2927 | </FormGroup>
|
2928 | <Button color="danger" onClick={this.toggle}>
|
2929 | Open
|
2930 | </Button>
|
2931 | </Form>
|
2932 | <Modal
|
2933 | returnFocusAfterClose={this.state.focusAfterClose}
|
2934 | isOpen={this.state.open}
|
2935 | >
|
2936 | <ModalBody>
|
2937 | Observe the "Open" button. It will be focused after close when
|
2938 | "returnFocusAfterClose" is true and will not be focused if
|
2939 | "returnFocusAfterClose" is false.
|
2940 | </ModalBody>
|
2941 | <ModalFooter>
|
2942 | <Button color="primary" onClick={this.toggle}>
|
2943 | Close
|
2944 | </Button>
|
2945 | </ModalFooter>
|
2946 | </Modal>
|
2947 | </div>
|
2948 | );
|
2949 | }
|
2950 | }
|
2951 |
|
2952 | class Example75 extends React.Component<any, any> {
|
2953 | state: any;
|
2954 | constructor(props: any) {
|
2955 | super(props);
|
2956 |
|
2957 | this.toggle = this.toggle.bind(this);
|
2958 | this.state = {
|
2959 | isOpen: false,
|
2960 | };
|
2961 | }
|
2962 | toggle() {
|
2963 | this.setState({
|
2964 | isOpen: !this.state.isOpen,
|
2965 | });
|
2966 | }
|
2967 | render() {
|
2968 | return (
|
2969 | <div>
|
2970 | <Navbar color="faded" light expand="md">
|
2971 | <NavbarBrand href="/">reactstrap</NavbarBrand>
|
2972 | <NavbarToggler onClick={this.toggle} />
|
2973 | <Collapse isOpen={this.state.isOpen} navbar>
|
2974 | <Nav className="ms-auto" navbar>
|
2975 | <NavItem>
|
2976 | <NavLink href="/components/">Components</NavLink>
|
2977 | </NavItem>
|
2978 | <NavItem>
|
2979 | <NavLink href="https://github.com/reactstrap/reactstrap">
|
2980 | Github
|
2981 | </NavLink>
|
2982 | </NavItem>
|
2983 | <UncontrolledDropdown nav inNavbar onToggle={() => {}} a11y>
|
2984 | <DropdownToggle nav caret>
|
2985 | Options
|
2986 | </DropdownToggle>
|
2987 | <DropdownMenu>
|
2988 | <DropdownItem>Option 1</DropdownItem>
|
2989 | <DropdownItem>Option 2</DropdownItem>
|
2990 | <DropdownItem divider />
|
2991 | <DropdownItem>Reset</DropdownItem>
|
2992 | </DropdownMenu>
|
2993 | </UncontrolledDropdown>
|
2994 | </Nav>
|
2995 | <NavbarText>Simple Text</NavbarText>
|
2996 | </Collapse>
|
2997 | </Navbar>
|
2998 | </div>
|
2999 | );
|
3000 | }
|
3001 | }
|
3002 |
|
3003 | class Example76 extends React.Component<any, any> {
|
3004 | state: any;
|
3005 | constructor(props: any) {
|
3006 | super(props);
|
3007 |
|
3008 | this.toggleNavbar = this.toggleNavbar.bind(this);
|
3009 | this.state = {
|
3010 | collapsed: true,
|
3011 | };
|
3012 | }
|
3013 |
|
3014 | toggleNavbar() {
|
3015 | this.setState({
|
3016 | collapsed: !this.state.collapsed,
|
3017 | });
|
3018 | }
|
3019 | render() {
|
3020 | return (
|
3021 | <div>
|
3022 | <Navbar color="faded" light>
|
3023 | <NavbarBrand href="/" className="me-auto">
|
3024 | reactstrap
|
3025 | </NavbarBrand>
|
3026 | <NavbarToggler onClick={this.toggleNavbar} className="me-2" />
|
3027 | <Collapse isOpen={!this.state.collapsed} navbar>
|
3028 | <Nav navbar>
|
3029 | <NavItem>
|
3030 | <NavLink href="/components/">Components</NavLink>
|
3031 | </NavItem>
|
3032 | <NavItem>
|
3033 | <NavLink href="https://github.com/reactstrap/reactstrap">
|
3034 | Github
|
3035 | </NavLink>
|
3036 | </NavItem>
|
3037 | </Nav>
|
3038 | </Collapse>
|
3039 | </Navbar>
|
3040 | </div>
|
3041 | );
|
3042 | }
|
3043 | }
|
3044 |
|
3045 | class Example77 extends React.Component {
|
3046 | render() {
|
3047 | return (
|
3048 | <div>
|
3049 | <p>List Based</p>
|
3050 | <Nav>
|
3051 | <NavItem>
|
3052 | <NavLink href="#">Link</NavLink>
|
3053 | </NavItem>
|
3054 | <NavItem>
|
3055 | <NavLink href="#">Link</NavLink>
|
3056 | </NavItem>
|
3057 | <NavItem>
|
3058 | <NavLink href="#">Another Link</NavLink>
|
3059 | </NavItem>
|
3060 | <NavItem>
|
3061 | <NavLink disabled href="#">
|
3062 | Disabled Link
|
3063 | </NavLink>
|
3064 | </NavItem>
|
3065 | </Nav>
|
3066 | <hr />
|
3067 | <p>Link Based</p>
|
3068 | <Nav>
|
3069 | <NavLink href="#">Link</NavLink> <NavLink href="#">Link</NavLink>{' '}
|
3070 | <NavLink href="#">Another Link</NavLink>{' '}
|
3071 | <NavLink disabled href="#">
|
3072 | Disabled Link
|
3073 | </NavLink>
|
3074 | </Nav>
|
3075 | </div>
|
3076 | );
|
3077 | }
|
3078 | }
|
3079 |
|
3080 | class Example78 extends React.Component<any, any> {
|
3081 | render() {
|
3082 | return (
|
3083 | <div>
|
3084 | <p>List Based</p>
|
3085 | <Nav vertical>
|
3086 | <NavItem>
|
3087 | <NavLink href="#">Link</NavLink>
|
3088 | </NavItem>
|
3089 | <NavItem>
|
3090 | <NavLink href="#">Link</NavLink>
|
3091 | </NavItem>
|
3092 | <NavItem>
|
3093 | <NavLink href="#">Another Link</NavLink>
|
3094 | </NavItem>
|
3095 | <NavItem>
|
3096 | <NavLink disabled href="#">
|
3097 | Disabled Link
|
3098 | </NavLink>
|
3099 | </NavItem>
|
3100 | </Nav>
|
3101 | <hr />
|
3102 | <p>Link based</p>
|
3103 | <Nav vertical>
|
3104 | <NavLink href="#">Link</NavLink> <NavLink href="#">Link</NavLink>{' '}
|
3105 | <NavLink href="#">Another Link</NavLink>{' '}
|
3106 | <NavLink disabled href="#">
|
3107 | Disabled Link
|
3108 | </NavLink>
|
3109 | </Nav>
|
3110 | </div>
|
3111 | );
|
3112 | }
|
3113 | }
|
3114 |
|
3115 | class Example79 extends React.Component<any, any> {
|
3116 | state: any;
|
3117 | constructor(props: any) {
|
3118 | super(props);
|
3119 |
|
3120 | this.toggle = this.toggle.bind(this);
|
3121 | this.state = {
|
3122 | dropdownOpen: false,
|
3123 | };
|
3124 | }
|
3125 |
|
3126 | toggle() {
|
3127 | this.setState({
|
3128 | dropdownOpen: !this.state.dropdownOpen,
|
3129 | });
|
3130 | }
|
3131 |
|
3132 | render() {
|
3133 | return (
|
3134 | <div>
|
3135 | <Nav tabs>
|
3136 | <NavItem>
|
3137 | <NavLink href="#" active>
|
3138 | Link
|
3139 | </NavLink>
|
3140 | </NavItem>
|
3141 | <Dropdown nav isOpen={this.state.dropdownOpen} toggle={this.toggle}>
|
3142 | <DropdownToggle nav caret>
|
3143 | Dropdown
|
3144 | </DropdownToggle>
|
3145 | <DropdownMenu>
|
3146 | <DropdownItem header>Header</DropdownItem>
|
3147 | <DropdownItem disabled>Action</DropdownItem>
|
3148 | <DropdownItem>Another Action</DropdownItem>
|
3149 | <DropdownItem divider />
|
3150 | <DropdownItem>Another Action</DropdownItem>
|
3151 | </DropdownMenu>
|
3152 | </Dropdown>
|
3153 | <NavItem>
|
3154 | <NavLink href="#">Link</NavLink>
|
3155 | </NavItem>
|
3156 | <NavItem>
|
3157 | <NavLink href="#">Another Link</NavLink>
|
3158 | </NavItem>
|
3159 | <NavItem>
|
3160 | <NavLink disabled href="#">
|
3161 | Disabled Link
|
3162 | </NavLink>
|
3163 | </NavItem>
|
3164 | </Nav>
|
3165 | </div>
|
3166 | );
|
3167 | }
|
3168 | }
|
3169 |
|
3170 | class Example80 extends React.Component<any, any> {
|
3171 | state: any;
|
3172 | constructor(props: any) {
|
3173 | super(props);
|
3174 |
|
3175 | this.toggle = this.toggle.bind(this);
|
3176 | this.state = {
|
3177 | dropdownOpen: false,
|
3178 | };
|
3179 | }
|
3180 |
|
3181 | toggle() {
|
3182 | this.setState({
|
3183 | dropdownOpen: !this.state.dropdownOpen,
|
3184 | });
|
3185 | }
|
3186 |
|
3187 | render() {
|
3188 | return (
|
3189 | <div>
|
3190 | <Nav pills>
|
3191 | <NavItem>
|
3192 | <NavLink href="#" active>
|
3193 | Link
|
3194 | </NavLink>
|
3195 | </NavItem>
|
3196 | <Dropdown nav isOpen={this.state.dropdownOpen} toggle={this.toggle}>
|
3197 | <DropdownToggle nav caret>
|
3198 | Dropdown
|
3199 | </DropdownToggle>
|
3200 | <DropdownMenu>
|
3201 | <DropdownItem header>Header</DropdownItem>
|
3202 | <DropdownItem disabled>Action</DropdownItem>
|
3203 | <DropdownItem>Another Action</DropdownItem>
|
3204 | <DropdownItem divider />
|
3205 | <DropdownItem>Another Action</DropdownItem>
|
3206 | </DropdownMenu>
|
3207 | </Dropdown>
|
3208 | <NavItem>
|
3209 | <NavLink href="#">Link</NavLink>
|
3210 | </NavItem>
|
3211 | <NavItem>
|
3212 | <NavLink href="#">Another Link</NavLink>
|
3213 | </NavItem>
|
3214 | <NavItem>
|
3215 | <NavLink disabled href="#">
|
3216 | Disabled Link
|
3217 | </NavLink>
|
3218 | </NavItem>
|
3219 | </Nav>
|
3220 | </div>
|
3221 | );
|
3222 | }
|
3223 | }
|
3224 |
|
3225 |
|
3226 | class Example81 extends React.Component {
|
3227 | render() {
|
3228 | return (
|
3229 | <Pagination aria-label="Page navigation example">
|
3230 | <PaginationItem>
|
3231 | <PaginationLink first href="#" />
|
3232 | </PaginationItem>
|
3233 | <PaginationItem>
|
3234 | <PaginationLink previous href="#" />
|
3235 | </PaginationItem>
|
3236 | <PaginationItem>
|
3237 | <PaginationLink href="#">1</PaginationLink>
|
3238 | </PaginationItem>
|
3239 | <PaginationItem>
|
3240 | <PaginationLink href="#">2</PaginationLink>
|
3241 | </PaginationItem>
|
3242 | <PaginationItem>
|
3243 | <PaginationLink href="#">3</PaginationLink>
|
3244 | </PaginationItem>
|
3245 | <PaginationItem>
|
3246 | <PaginationLink href="#">4</PaginationLink>
|
3247 | </PaginationItem>
|
3248 | <PaginationItem>
|
3249 | <PaginationLink href="#">5</PaginationLink>
|
3250 | </PaginationItem>
|
3251 | <PaginationItem>
|
3252 | <PaginationLink next href="#" />
|
3253 | </PaginationItem>
|
3254 | <PaginationItem>
|
3255 | <PaginationLink last href="#" />
|
3256 | </PaginationItem>
|
3257 | </Pagination>
|
3258 | );
|
3259 | }
|
3260 | }
|
3261 |
|
3262 | class Example82 extends React.Component {
|
3263 | render() {
|
3264 | return (
|
3265 | <Pagination aria-label="Page navigation example">
|
3266 | <PaginationItem disabled>
|
3267 | <PaginationLink first href="#" />
|
3268 | </PaginationItem>
|
3269 | <PaginationItem disabled>
|
3270 | <PaginationLink previous href="#" />
|
3271 | </PaginationItem>
|
3272 | <PaginationItem active>
|
3273 | <PaginationLink href="#">1</PaginationLink>
|
3274 | </PaginationItem>
|
3275 | <PaginationItem>
|
3276 | <PaginationLink href="#">2</PaginationLink>
|
3277 | </PaginationItem>
|
3278 | <PaginationItem>
|
3279 | <PaginationLink href="#">3</PaginationLink>
|
3280 | </PaginationItem>
|
3281 | <PaginationItem>
|
3282 | <PaginationLink href="#">4</PaginationLink>
|
3283 | </PaginationItem>
|
3284 | <PaginationItem>
|
3285 | <PaginationLink href="#">5</PaginationLink>
|
3286 | </PaginationItem>
|
3287 | <PaginationItem>
|
3288 | <PaginationLink next href="#" />
|
3289 | </PaginationItem>
|
3290 | <PaginationItem>
|
3291 | <PaginationLink last href="#" />
|
3292 | </PaginationItem>
|
3293 | </Pagination>
|
3294 | );
|
3295 | }
|
3296 | }
|
3297 |
|
3298 | class Example83 extends React.Component {
|
3299 | render() {
|
3300 | return (
|
3301 | <Pagination size="lg" aria-label="Page navigation example">
|
3302 | <PaginationItem>
|
3303 | <PaginationLink first href="#" />
|
3304 | </PaginationItem>
|
3305 | <PaginationItem>
|
3306 | <PaginationLink previous href="#" />
|
3307 | </PaginationItem>
|
3308 | <PaginationItem>
|
3309 | <PaginationLink href="#">1</PaginationLink>
|
3310 | </PaginationItem>
|
3311 | <PaginationItem>
|
3312 | <PaginationLink href="#">2</PaginationLink>
|
3313 | </PaginationItem>
|
3314 | <PaginationItem>
|
3315 | <PaginationLink href="#">3</PaginationLink>
|
3316 | </PaginationItem>
|
3317 | <PaginationItem>
|
3318 | <PaginationLink next href="#" />
|
3319 | </PaginationItem>
|
3320 | <PaginationItem>
|
3321 | <PaginationLink last href="#" />
|
3322 | </PaginationItem>
|
3323 | </Pagination>
|
3324 | );
|
3325 | }
|
3326 | }
|
3327 |
|
3328 | class Example84 extends React.Component {
|
3329 | render() {
|
3330 | return (
|
3331 | <Pagination size="sm" aria-label="Page navigation example">
|
3332 | <PaginationItem>
|
3333 | <PaginationLink first href="#" />
|
3334 | </PaginationItem>
|
3335 | <PaginationItem>
|
3336 | <PaginationLink previous href="#" />
|
3337 | </PaginationItem>
|
3338 | <PaginationItem>
|
3339 | <PaginationLink href="#">1</PaginationLink>
|
3340 | </PaginationItem>
|
3341 | <PaginationItem>
|
3342 | <PaginationLink href="#">2</PaginationLink>
|
3343 | </PaginationItem>
|
3344 | <PaginationItem>
|
3345 | <PaginationLink href="#">3</PaginationLink>
|
3346 | </PaginationItem>
|
3347 | <PaginationItem>
|
3348 | <PaginationLink next href="#" />
|
3349 | </PaginationItem>
|
3350 | <PaginationItem>
|
3351 | <PaginationLink last href="#" />
|
3352 | </PaginationItem>
|
3353 | </Pagination>
|
3354 | );
|
3355 | }
|
3356 | }
|
3357 |
|
3358 |
|
3359 | class Example85 extends React.Component<any, any> {
|
3360 | state: any;
|
3361 | constructor(props: any) {
|
3362 | super(props);
|
3363 |
|
3364 | this.toggle = this.toggle.bind(this);
|
3365 | this.state = {
|
3366 | popoverOpen: false,
|
3367 | };
|
3368 | }
|
3369 |
|
3370 | toggle() {
|
3371 | this.setState({
|
3372 | popoverOpen: !this.state.popoverOpen,
|
3373 | });
|
3374 | }
|
3375 |
|
3376 | render() {
|
3377 | return (
|
3378 | <div>
|
3379 | <Button id="Popover1" onClick={this.toggle}>
|
3380 | Launch Popover
|
3381 | </Button>
|
3382 | <Popover
|
3383 | placement="bottom"
|
3384 | isOpen={this.state.popoverOpen}
|
3385 | target="Popover1"
|
3386 | toggle={this.toggle}
|
3387 | onClick={() => {}}
|
3388 | >
|
3389 | <PopoverHeader>Popover Title</PopoverHeader>
|
3390 | <PopoverBody>
|
3391 | Sed posuere consectetur est at lobortis. Aenean eu leo quam.
|
3392 | Pellentesque ornare sem lacinia quam venenatis vestibulum.
|
3393 | </PopoverBody>
|
3394 | </Popover>
|
3395 | </div>
|
3396 | );
|
3397 | }
|
3398 | }
|
3399 |
|
3400 | class PopoverItem extends React.Component<any, any> {
|
3401 | state: any;
|
3402 | constructor(props: any) {
|
3403 | super(props);
|
3404 |
|
3405 | this.toggle = this.toggle.bind(this);
|
3406 | this.state = {
|
3407 | popoverOpen: false,
|
3408 | };
|
3409 | }
|
3410 |
|
3411 | toggle() {
|
3412 | this.setState({
|
3413 | popoverOpen: !this.state.popoverOpen,
|
3414 | });
|
3415 | }
|
3416 |
|
3417 | render() {
|
3418 | return (
|
3419 | <span>
|
3420 | <Button
|
3421 | className="me-1"
|
3422 | color="secondary"
|
3423 | id={'Popover-' + this.props.id}
|
3424 | onClick={this.toggle}
|
3425 | >
|
3426 | {this.props.item.text}
|
3427 | </Button>
|
3428 | <Popover
|
3429 | placement={this.props.item.placement}
|
3430 | isOpen={this.state.popoverOpen}
|
3431 | target={'Popover-' + this.props.id}
|
3432 | toggle={this.toggle}
|
3433 | hideArrow={true}
|
3434 | >
|
3435 | <PopoverHeader>Popover Title</PopoverHeader>
|
3436 | <PopoverBody>
|
3437 | Sed posuere consectetur est at lobortis. Aenean eu leo quam.
|
3438 | Pellentesque ornare sem lacinia quam venenatis vestibulum.
|
3439 | </PopoverBody>
|
3440 | </Popover>
|
3441 | </span>
|
3442 | );
|
3443 | }
|
3444 | }
|
3445 |
|
3446 | class PopoverExampleMulti extends React.Component<
|
3447 | any,
|
3448 | { popovers: Array<{ placement: string; text: string }> }
|
3449 | > {
|
3450 | state: { popovers: Array<{ placement: string; text: string }> };
|
3451 | constructor(props: any) {
|
3452 | super(props);
|
3453 |
|
3454 | this.state = {
|
3455 | popovers: [
|
3456 | {
|
3457 | placement: 'top',
|
3458 | text: 'Top',
|
3459 | },
|
3460 | {
|
3461 | placement: 'bottom',
|
3462 | text: 'Bottom',
|
3463 | },
|
3464 | {
|
3465 | placement: 'left',
|
3466 | text: 'Left',
|
3467 | },
|
3468 | {
|
3469 | placement: 'right',
|
3470 | text: 'Right',
|
3471 | },
|
3472 | ],
|
3473 | };
|
3474 | }
|
3475 |
|
3476 | render() {
|
3477 | return (
|
3478 | <div>
|
3479 | {this.state.popovers.map((popover, i) => {
|
3480 | return <PopoverItem key={i} item={popover} id={i} />;
|
3481 | })}
|
3482 | </div>
|
3483 | );
|
3484 | }
|
3485 | }
|
3486 |
|
3487 | class PopoverExampleFlipFade extends React.Component<any, any> {
|
3488 | render() {
|
3489 | return (
|
3490 | <Popover target="dummy" flip fade>
|
3491 | <PopoverHeader>Popover Title</PopoverHeader>
|
3492 | <PopoverBody>
|
3493 | Sed posuere consectetur est at lobortis. Aenean eu leo quam.
|
3494 | Pellentesque ornare sem lacinia quam venenatis vestibulum.
|
3495 | </PopoverBody>
|
3496 | </Popover>
|
3497 | );
|
3498 | }
|
3499 | }
|
3500 |
|
3501 |
|
3502 |
|
3503 | const Example86 = (props: any) => {
|
3504 | return (
|
3505 | <div>
|
3506 | <div className="text-center">0%</div>
|
3507 | <Progress />
|
3508 | <div className="text-center">25%</div>
|
3509 | <Progress value="25" />
|
3510 | <div className="text-center">50%</div>
|
3511 | <Progress value={50} />
|
3512 | <div className="text-center">75%</div>
|
3513 | <Progress value={75} />
|
3514 | <div className="text-center">100%</div>
|
3515 | <Progress value="100" />
|
3516 | <div className="text-center">Multiple bars</div>
|
3517 | <Progress multi>
|
3518 | <Progress bar value="15" />
|
3519 | <Progress bar color="success" value="30" />
|
3520 | <Progress bar color="info" value="25" />
|
3521 | <Progress bar color="warning" value="20" />
|
3522 | <Progress bar color="danger" value="5" />
|
3523 | </Progress>
|
3524 | </div>
|
3525 | );
|
3526 | };
|
3527 |
|
3528 | const Example87 = (props: any) => {
|
3529 | return (
|
3530 | <div>
|
3531 | <Progress value={2 * 5} />
|
3532 | <Progress color="success" value="25" />
|
3533 | <Progress color="info" value={50} />
|
3534 | <Progress color="warning" value={75} />
|
3535 | <Progress color="danger" value="100" />
|
3536 | </div>
|
3537 | );
|
3538 | };
|
3539 |
|
3540 | const Example88 = (props: any) => {
|
3541 | return (
|
3542 | <div>
|
3543 | <Progress value="25">25%</Progress>
|
3544 | <Progress value={50}>1/2</Progress>
|
3545 | <Progress value={75}>You're almost there!</Progress>
|
3546 | <Progress color="success" value="100">
|
3547 | You did it!
|
3548 | </Progress>
|
3549 | <Progress multi>
|
3550 | <Progress bar value="15">
|
3551 | Meh
|
3552 | </Progress>
|
3553 | <Progress bar color="success" value="30">
|
3554 | Wow!
|
3555 | </Progress>
|
3556 | <Progress bar color="info" value="25">
|
3557 | Cool
|
3558 | </Progress>
|
3559 | <Progress bar color="warning" value="20">
|
3560 | 20%
|
3561 | </Progress>
|
3562 | <Progress bar color="danger" value="5">
|
3563 | !!
|
3564 | </Progress>
|
3565 | </Progress>
|
3566 | </div>
|
3567 | );
|
3568 | };
|
3569 |
|
3570 | const Example89 = (props: any) => {
|
3571 | return (
|
3572 | <div>
|
3573 | <Progress striped value={2 * 5} />
|
3574 | <Progress striped color="success" value="25" />
|
3575 | <Progress striped color="info" value={50} />
|
3576 | <Progress striped color="warning" value={75} />
|
3577 | <Progress striped color="danger" value="100" />
|
3578 | <Progress multi>
|
3579 | <Progress striped bar value="10" />
|
3580 | <Progress striped bar color="success" value="30" />
|
3581 | <Progress striped bar color="warning" value="20" />
|
3582 | <Progress striped bar color="danger" value="20" />
|
3583 | </Progress>
|
3584 | </div>
|
3585 | );
|
3586 | };
|
3587 |
|
3588 | const Example90 = (props: any) => {
|
3589 | return (
|
3590 | <div>
|
3591 | <Progress animated value={2 * 5} />
|
3592 | <Progress animated color="success" value="25" />
|
3593 | <Progress animated color="info" value={50} />
|
3594 | <Progress animated color="warning" value={75} />
|
3595 | <Progress animated color="danger" value="100" />
|
3596 | <Progress multi>
|
3597 | <Progress animated bar value="10" />
|
3598 | <Progress animated bar color="success" value="30" />
|
3599 | <Progress animated bar color="warning" value="20" />
|
3600 | <Progress animated bar color="danger" value="20" />
|
3601 | </Progress>
|
3602 | </div>
|
3603 | );
|
3604 | };
|
3605 |
|
3606 | const Example91 = (props: any) => {
|
3607 | return (
|
3608 | <div>
|
3609 | <div className="text-center">Plain</div>
|
3610 | <Progress multi>
|
3611 | <Progress bar value="15" />
|
3612 | <Progress bar color="success" value="20" />
|
3613 | <Progress bar color="info" value="25" />
|
3614 | <Progress bar color="warning" value="20" />
|
3615 | <Progress bar color="danger" value="15" />
|
3616 | </Progress>
|
3617 | <div className="text-center">With Labels</div>
|
3618 | <Progress multi>
|
3619 | <Progress bar value="15">
|
3620 | Meh
|
3621 | </Progress>
|
3622 | <Progress bar color="success" value="35">
|
3623 | Wow!
|
3624 | </Progress>
|
3625 | <Progress bar color="warning" value="25">
|
3626 | 25%
|
3627 | </Progress>
|
3628 | <Progress bar color="danger" value="25">
|
3629 | LOOK OUT!!
|
3630 | </Progress>
|
3631 | </Progress>
|
3632 | <div className="text-center">Stripes and Animations</div>
|
3633 | <Progress multi>
|
3634 | <Progress bar striped value="15">
|
3635 | Stripes
|
3636 | </Progress>
|
3637 | <Progress bar animated color="success" value="30">
|
3638 | Animated Stripes
|
3639 | </Progress>
|
3640 | <Progress bar color="info" value="25">
|
3641 | Plain
|
3642 | </Progress>
|
3643 | </Progress>
|
3644 | </div>
|
3645 | );
|
3646 | };
|
3647 |
|
3648 | const Example92 = (props: any) => {
|
3649 | return (
|
3650 | <div>
|
3651 | <div className="text-center">1 of 5</div>
|
3652 | <Progress value="1" min="1" max="5" />
|
3653 | <div className="text-center">50 of 135</div>
|
3654 | <Progress value={50} max="135" />
|
3655 | <div className="text-center">75 of 111</div>
|
3656 | <Progress value={75} min={1} max={111} />
|
3657 | <div className="text-center">463 of 500</div>
|
3658 | <Progress
|
3659 | value="463"
|
3660 | max={500}
|
3661 | barAriaValueText="test"
|
3662 | barAriaLabelledBy="test"
|
3663 | />
|
3664 |
|
3665 | <div className="text-center">Various (40) of 55</div>
|
3666 | <Progress multi>
|
3667 | <Progress bar value="5" max={55}>
|
3668 | 5
|
3669 | </Progress>
|
3670 | <Progress bar color="success" value="15" max={55}>
|
3671 | 15
|
3672 | </Progress>
|
3673 | <Progress bar color="warning" value="10" max={55}>
|
3674 | 10
|
3675 | </Progress>
|
3676 | <Progress bar color="danger" value="10" max={55}>
|
3677 | 10
|
3678 | </Progress>
|
3679 | </Progress>
|
3680 | </div>
|
3681 | );
|
3682 | };
|
3683 |
|
3684 |
|
3685 | class Example93 extends React.Component {
|
3686 | render() {
|
3687 | return (
|
3688 | <Table>
|
3689 | <thead>
|
3690 | <tr>
|
3691 | <th>#</th>
|
3692 | <th>First Name</th>
|
3693 | <th>Last Name</th>
|
3694 | <th>Username</th>
|
3695 | </tr>
|
3696 | </thead>
|
3697 | <tbody>
|
3698 | <tr>
|
3699 | <th scope="row">1</th>
|
3700 | <td>Mark</td>
|
3701 | <td>Otto</td>
|
3702 | <td>@mdo</td>
|
3703 | </tr>
|
3704 | <tr>
|
3705 | <th scope="row">2</th>
|
3706 | <td>Jacob</td>
|
3707 | <td>Thornton</td>
|
3708 | <td>@fat</td>
|
3709 | </tr>
|
3710 | <tr>
|
3711 | <th scope="row">3</th>
|
3712 | <td>Larry</td>
|
3713 | <td>the Bird</td>
|
3714 | <td>@twitter</td>
|
3715 | </tr>
|
3716 | </tbody>
|
3717 | </Table>
|
3718 | );
|
3719 | }
|
3720 | }
|
3721 |
|
3722 | class Example94 extends React.Component {
|
3723 | render() {
|
3724 | return (
|
3725 | <Table inverse>
|
3726 | <thead>
|
3727 | <tr>
|
3728 | <th>#</th>
|
3729 | <th>First Name</th>
|
3730 | <th>Last Name</th>
|
3731 | <th>Username</th>
|
3732 | </tr>
|
3733 | </thead>
|
3734 | <tbody>
|
3735 | <tr>
|
3736 | <th scope="row">1</th>
|
3737 | <td>Mark</td>
|
3738 | <td>Otto</td>
|
3739 | <td>@mdo</td>
|
3740 | </tr>
|
3741 | <tr>
|
3742 | <th scope="row">2</th>
|
3743 | <td>Jacob</td>
|
3744 | <td>Thornton</td>
|
3745 | <td>@fat</td>
|
3746 | </tr>
|
3747 | <tr>
|
3748 | <th scope="row">3</th>
|
3749 | <td>Larry</td>
|
3750 | <td>the Bird</td>
|
3751 | <td>@twitter</td>
|
3752 | </tr>
|
3753 | </tbody>
|
3754 | </Table>
|
3755 | );
|
3756 | }
|
3757 | }
|
3758 |
|
3759 | class Example95 extends React.Component {
|
3760 | render() {
|
3761 | return (
|
3762 | <Table striped>
|
3763 | <thead>
|
3764 | <tr>
|
3765 | <th>#</th>
|
3766 | <th>First Name</th>
|
3767 | <th>Last Name</th>
|
3768 | <th>Username</th>
|
3769 | </tr>
|
3770 | </thead>
|
3771 | <tbody>
|
3772 | <tr>
|
3773 | <th scope="row">1</th>
|
3774 | <td>Mark</td>
|
3775 | <td>Otto</td>
|
3776 | <td>@mdo</td>
|
3777 | </tr>
|
3778 | <tr>
|
3779 | <th scope="row">2</th>
|
3780 | <td>Jacob</td>
|
3781 | <td>Thornton</td>
|
3782 | <td>@fat</td>
|
3783 | </tr>
|
3784 | <tr>
|
3785 | <th scope="row">3</th>
|
3786 | <td>Larry</td>
|
3787 | <td>the Bird</td>
|
3788 | <td>@twitter</td>
|
3789 | </tr>
|
3790 | </tbody>
|
3791 | </Table>
|
3792 | );
|
3793 | }
|
3794 | }
|
3795 |
|
3796 | class Example96 extends React.Component {
|
3797 | render() {
|
3798 | return (
|
3799 | <Table bordered>
|
3800 | <thead>
|
3801 | <tr>
|
3802 | <th>#</th>
|
3803 | <th>First Name</th>
|
3804 | <th>Last Name</th>
|
3805 | <th>Username</th>
|
3806 | </tr>
|
3807 | </thead>
|
3808 | <tbody>
|
3809 | <tr>
|
3810 | <th scope="row">1</th>
|
3811 | <td>Mark</td>
|
3812 | <td>Otto</td>
|
3813 | <td>@mdo</td>
|
3814 | </tr>
|
3815 | <tr>
|
3816 | <th scope="row">2</th>
|
3817 | <td>Jacob</td>
|
3818 | <td>Thornton</td>
|
3819 | <td>@fat</td>
|
3820 | </tr>
|
3821 | <tr>
|
3822 | <th scope="row">3</th>
|
3823 | <td>Larry</td>
|
3824 | <td>the Bird</td>
|
3825 | <td>@twitter</td>
|
3826 | </tr>
|
3827 | </tbody>
|
3828 | </Table>
|
3829 | );
|
3830 | }
|
3831 | }
|
3832 |
|
3833 | class Example97 extends React.Component {
|
3834 | render() {
|
3835 | return (
|
3836 | <Table hover>
|
3837 | <thead>
|
3838 | <tr>
|
3839 | <th>#</th>
|
3840 | <th>First Name</th>
|
3841 | <th>Last Name</th>
|
3842 | <th>Username</th>
|
3843 | </tr>
|
3844 | </thead>
|
3845 | <tbody>
|
3846 | <tr>
|
3847 | <th scope="row">1</th>
|
3848 | <td>Mark</td>
|
3849 | <td>Otto</td>
|
3850 | <td>@mdo</td>
|
3851 | </tr>
|
3852 | <tr>
|
3853 | <th scope="row">2</th>
|
3854 | <td>Jacob</td>
|
3855 | <td>Thornton</td>
|
3856 | <td>@fat</td>
|
3857 | </tr>
|
3858 | <tr>
|
3859 | <th scope="row">3</th>
|
3860 | <td>Larry</td>
|
3861 | <td>the Bird</td>
|
3862 | <td>@twitter</td>
|
3863 | </tr>
|
3864 | </tbody>
|
3865 | </Table>
|
3866 | );
|
3867 | }
|
3868 | }
|
3869 |
|
3870 | class Example98 extends React.Component {
|
3871 | render() {
|
3872 | return (
|
3873 | <Table size="sm">
|
3874 | <thead>
|
3875 | <tr>
|
3876 | <th>#</th>
|
3877 | <th>First Name</th>
|
3878 | <th>Last Name</th>
|
3879 | <th>Username</th>
|
3880 | </tr>
|
3881 | </thead>
|
3882 | <tbody>
|
3883 | <tr>
|
3884 | <th scope="row">1</th>
|
3885 | <td>Mark</td>
|
3886 | <td>Otto</td>
|
3887 | <td>@mdo</td>
|
3888 | </tr>
|
3889 | <tr>
|
3890 | <th scope="row">2</th>
|
3891 | <td>Jacob</td>
|
3892 | <td>Thornton</td>
|
3893 | <td>@fat</td>
|
3894 | </tr>
|
3895 | <tr>
|
3896 | <th scope="row">3</th>
|
3897 | <td>Larry</td>
|
3898 | <td>the Bird</td>
|
3899 | <td>@twitter</td>
|
3900 | </tr>
|
3901 | </tbody>
|
3902 | </Table>
|
3903 | );
|
3904 | }
|
3905 | }
|
3906 |
|
3907 | class Example99 extends React.Component {
|
3908 | render() {
|
3909 | return (
|
3910 | <Table responsive="md">
|
3911 | <thead>
|
3912 | <tr>
|
3913 | <th>#</th>
|
3914 | <th>Table heading</th>
|
3915 | <th>Table heading</th>
|
3916 | <th>Table heading</th>
|
3917 | <th>Table heading</th>
|
3918 | <th>Table heading</th>
|
3919 | <th>Table heading</th>
|
3920 | </tr>
|
3921 | </thead>
|
3922 | <tbody>
|
3923 | <tr>
|
3924 | <th scope="row">1</th>
|
3925 | <td>Table cell</td>
|
3926 | <td>Table cell</td>
|
3927 | <td>Table cell</td>
|
3928 | <td>Table cell</td>
|
3929 | <td>Table cell</td>
|
3930 | <td>Table cell</td>
|
3931 | </tr>
|
3932 | <tr>
|
3933 | <th scope="row">2</th>
|
3934 | <td>Table cell</td>
|
3935 | <td>Table cell</td>
|
3936 | <td>Table cell</td>
|
3937 | <td>Table cell</td>
|
3938 | <td>Table cell</td>
|
3939 | <td>Table cell</td>
|
3940 | </tr>
|
3941 | <tr>
|
3942 | <th scope="row">3</th>
|
3943 | <td>Table cell</td>
|
3944 | <td>Table cell</td>
|
3945 | <td>Table cell</td>
|
3946 | <td>Table cell</td>
|
3947 | <td>Table cell</td>
|
3948 | <td>Table cell</td>
|
3949 | </tr>
|
3950 | </tbody>
|
3951 | </Table>
|
3952 | );
|
3953 | }
|
3954 | }
|
3955 |
|
3956 | class Example100 extends React.Component {
|
3957 | render() {
|
3958 | return (
|
3959 | <Table responsive>
|
3960 | <thead>
|
3961 | <tr>
|
3962 | <th>#</th>
|
3963 | <th>Table heading</th>
|
3964 | <th>Table heading</th>
|
3965 | <th>Table heading</th>
|
3966 | <th>Table heading</th>
|
3967 | <th>Table heading</th>
|
3968 | <th>Table heading</th>
|
3969 | </tr>
|
3970 | </thead>
|
3971 | <tbody>
|
3972 | <tr>
|
3973 | <th scope="row">1</th>
|
3974 | <td>Table cell</td>
|
3975 | <td>Table cell</td>
|
3976 | <td>Table cell</td>
|
3977 | <td>Table cell</td>
|
3978 | <td>Table cell</td>
|
3979 | <td>Table cell</td>
|
3980 | </tr>
|
3981 | <tr>
|
3982 | <th scope="row">2</th>
|
3983 | <td>Table cell</td>
|
3984 | <td>Table cell</td>
|
3985 | <td>Table cell</td>
|
3986 | <td>Table cell</td>
|
3987 | <td>Table cell</td>
|
3988 | <td>Table cell</td>
|
3989 | </tr>
|
3990 | <tr>
|
3991 | <th scope="row">3</th>
|
3992 | <td>Table cell</td>
|
3993 | <td>Table cell</td>
|
3994 | <td>Table cell</td>
|
3995 | <td>Table cell</td>
|
3996 | <td>Table cell</td>
|
3997 | <td>Table cell</td>
|
3998 | </tr>
|
3999 | </tbody>
|
4000 | </Table>
|
4001 | );
|
4002 | }
|
4003 | }
|
4004 |
|
4005 | class Example101 extends React.Component<any, any> {
|
4006 | state: any;
|
4007 | constructor(props: any) {
|
4008 | super(props);
|
4009 |
|
4010 | this.toggle = this.toggle.bind(this);
|
4011 | this.state = {
|
4012 | activeTab: '1',
|
4013 | };
|
4014 | }
|
4015 |
|
4016 | toggle(tab: string) {
|
4017 | if (this.state.activeTab !== tab) {
|
4018 | this.setState({
|
4019 | activeTab: tab,
|
4020 | });
|
4021 | }
|
4022 | }
|
4023 | render() {
|
4024 | return (
|
4025 | <div>
|
4026 | <Nav tabs>
|
4027 | <NavItem>
|
4028 | <NavLink
|
4029 | className=""
|
4030 | onClick={() => {
|
4031 | this.toggle('1');
|
4032 | }}
|
4033 | >
|
4034 | Tab1
|
4035 | </NavLink>
|
4036 | </NavItem>
|
4037 | <NavItem>
|
4038 | <NavLink
|
4039 | className=""
|
4040 | onClick={() => {
|
4041 | this.toggle('2');
|
4042 | }}
|
4043 | >
|
4044 | Moar Tabs
|
4045 | </NavLink>
|
4046 | </NavItem>
|
4047 | </Nav>
|
4048 | <TabContent activeTab={this.state.activeTab}>
|
4049 | <TabPane tabId="1">
|
4050 | <Row>
|
4051 | <Col sm="12">
|
4052 | <h4>Tab 1 Contents</h4>
|
4053 | </Col>
|
4054 | </Row>
|
4055 | </TabPane>
|
4056 | <TabPane tabId="2">
|
4057 | <Row>
|
4058 | <Col sm="6">
|
4059 | <Card body>
|
4060 | <CardTitle>Special Title Treatment</CardTitle>
|
4061 | <CardText>
|
4062 | With supporting text below as a natural lead-in to
|
4063 | additional content.
|
4064 | </CardText>
|
4065 | <Button>Go somewhere</Button>
|
4066 | </Card>
|
4067 | </Col>
|
4068 | <Col sm="6">
|
4069 | <Card body>
|
4070 | <CardTitle>Special Title Treatment</CardTitle>
|
4071 | <CardText>
|
4072 | With supporting text below as a natural lead-in to
|
4073 | additional content.
|
4074 | </CardText>
|
4075 | <Button>Go somewhere</Button>
|
4076 | </Card>
|
4077 | </Col>
|
4078 | </Row>
|
4079 | </TabPane>
|
4080 | </TabContent>
|
4081 | </div>
|
4082 | );
|
4083 | }
|
4084 | }
|
4085 |
|
4086 | class Example102 extends React.Component<any, any> {
|
4087 | state: any;
|
4088 | constructor(props: any) {
|
4089 | super(props);
|
4090 |
|
4091 | this.toggle = this.toggle.bind(this);
|
4092 | this.state = {
|
4093 | tooltipOpen: false,
|
4094 | };
|
4095 | }
|
4096 |
|
4097 | toggle() {
|
4098 | this.setState({
|
4099 | tooltipOpen: !this.state.tooltipOpen,
|
4100 | });
|
4101 | }
|
4102 |
|
4103 | render() {
|
4104 | return (
|
4105 | <div>
|
4106 | <p>
|
4107 | Somewhere in here is a{' '}
|
4108 | <a href="#" id="TooltipExample">
|
4109 | tooltip
|
4110 | </a>
|
4111 | .
|
4112 | </p>
|
4113 | <Tooltip
|
4114 | placement="end"
|
4115 | isOpen={this.state.tooltipOpen}
|
4116 | target="TooltipExample"
|
4117 | toggle={this.toggle}
|
4118 | >
|
4119 | Hello world!
|
4120 | </Tooltip>
|
4121 | </div>
|
4122 | );
|
4123 | }
|
4124 | }
|
4125 |
|
4126 | class Example103 extends React.Component<any, any> {
|
4127 | state: any;
|
4128 | constructor(props: any) {
|
4129 | super(props);
|
4130 |
|
4131 | this.toggle = this.toggle.bind(this);
|
4132 | this.state = {
|
4133 | tooltipOpen: false,
|
4134 | };
|
4135 | }
|
4136 |
|
4137 | toggle() {
|
4138 | this.setState({
|
4139 | tooltipOpen: !this.state.tooltipOpen,
|
4140 | });
|
4141 | }
|
4142 |
|
4143 | render() {
|
4144 | return (
|
4145 | <div>
|
4146 | <p>
|
4147 | Sometimes you need to allow users to select text within a{' '}
|
4148 | <a href="#" id="DisabledAutoHideExample">
|
4149 | tooltip
|
4150 | </a>
|
4151 | .
|
4152 | </p>
|
4153 | <Tooltip
|
4154 | placement="top"
|
4155 | isOpen={this.state.tooltipOpen}
|
4156 | autohide={false}
|
4157 | target="DisabledAutoHideExample"
|
4158 | toggle={this.toggle}
|
4159 | >
|
4160 | Try to select this text!
|
4161 | </Tooltip>
|
4162 | </div>
|
4163 | );
|
4164 | }
|
4165 | }
|
4166 |
|
4167 | class TooltipItem extends React.Component<any, any> {
|
4168 | state: any;
|
4169 | constructor(props: any) {
|
4170 | super(props);
|
4171 |
|
4172 | this.toggle = this.toggle.bind(this);
|
4173 | this.state = {
|
4174 | tooltipOpen: false,
|
4175 | };
|
4176 | }
|
4177 |
|
4178 | toggle() {
|
4179 | this.setState({
|
4180 | tooltipOpen: !this.state.tooltipOpen,
|
4181 | });
|
4182 | }
|
4183 |
|
4184 | render() {
|
4185 | return (
|
4186 | <span>
|
4187 | <Button
|
4188 | className="me-1"
|
4189 | color="secondary"
|
4190 | id={'Tooltip-' + this.props.id}
|
4191 | >
|
4192 | {this.props.item.text}
|
4193 | </Button>
|
4194 | <Tooltip
|
4195 | placement={this.props.item.placement}
|
4196 | isOpen={this.state.tooltipOpen}
|
4197 | target={'Tooltip-' + this.props.id}
|
4198 | toggle={this.toggle}
|
4199 | >
|
4200 | Tooltip Content!
|
4201 | </Tooltip>
|
4202 | </span>
|
4203 | );
|
4204 | }
|
4205 | }
|
4206 |
|
4207 | class TooltipExampleMulti extends React.Component<any, any> {
|
4208 | state: any;
|
4209 | constructor(props: any) {
|
4210 | super(props);
|
4211 |
|
4212 | this.state = {
|
4213 | tooltips: [
|
4214 | {
|
4215 | placement: 'top',
|
4216 | text: 'Top',
|
4217 | },
|
4218 | {
|
4219 | placement: 'bottom',
|
4220 | text: 'Bottom',
|
4221 | },
|
4222 | {
|
4223 | placement: 'left',
|
4224 | text: 'Left',
|
4225 | },
|
4226 | {
|
4227 | placement: 'right',
|
4228 | text: 'Right',
|
4229 | },
|
4230 | ],
|
4231 | };
|
4232 | }
|
4233 |
|
4234 | render() {
|
4235 | return (
|
4236 | <div>
|
4237 | {this.state.tooltips.map(
|
4238 | (tooltip: { placement: string; text: string }, i: number) => {
|
4239 | return <TooltipItem key={i} item={tooltip} id={i} />;
|
4240 | }
|
4241 | )}
|
4242 | </div>
|
4243 | );
|
4244 | }
|
4245 | }
|
4246 |
|
4247 | class TooltipExampleFlipFade {
|
4248 | render() {
|
4249 | return (
|
4250 | <Tooltip target="dummy" flip fade>
|
4251 | Tooltip Content!
|
4252 | </Tooltip>
|
4253 | );
|
4254 | }
|
4255 | }
|
4256 |
|
4257 | function Example() {
|
4258 | return (
|
4259 | <div>
|
4260 | <p>
|
4261 | Somewhere in here is a{' '}
|
4262 | <a href="#" id="UncontrolledTooltipExample">
|
4263 | tooltip
|
4264 | </a>
|
4265 | .
|
4266 | </p>
|
4267 | <UncontrolledTooltip
|
4268 | placement="end"
|
4269 | target="UncontrolledTooltipExample"
|
4270 | popperClassName="popperClassName"
|
4271 | >
|
4272 | Hello world!
|
4273 | </UncontrolledTooltip>
|
4274 | </div>
|
4275 | );
|
4276 | }
|
4277 |
|
4278 | function Example104() {
|
4279 | const props = {
|
4280 | className: 'my-input',
|
4281 | style: {
|
4282 | borderColor: 'black',
|
4283 | },
|
4284 | };
|
4285 |
|
4286 | return (
|
4287 | <FormGroup className="some-class" aria-labelledby="label">
|
4288 | <Label sm={3} id="label">
|
4289 | Label
|
4290 | </Label>
|
4291 |
|
4292 | <Col className="col-12" sm={9}>
|
4293 | <Input type="text" bsSize="lg" {...props} />
|
4294 | </Col>
|
4295 | </FormGroup>
|
4296 | );
|
4297 | }
|
4298 |
|
4299 | function Example105() {
|
4300 | return (
|
4301 | <Dropdown className="main-nav-avatar" isOpen={true} aria-labelledby="menu">
|
4302 | <a
|
4303 | href="javascript:void(0)"
|
4304 | id="menu"
|
4305 | data-toggle="dropdown"
|
4306 | aria-haspopup="true"
|
4307 | aria-expanded="false"
|
4308 | >
|
4309 | Toggle
|
4310 | </a>
|
4311 |
|
4312 | <DropdownMenu right className="asdf">
|
4313 | <div className="d-block">Item</div>
|
4314 | </DropdownMenu>
|
4315 | </Dropdown>
|
4316 | );
|
4317 | }
|
4318 |
|
4319 | function Example106() {
|
4320 | return (
|
4321 | <Nav vertical>
|
4322 | <NavLink className="toggle-drawer" href="#">
|
4323 | Details
|
4324 | </NavLink>
|
4325 | </Nav>
|
4326 | );
|
4327 | }
|
4328 |
|
4329 | const CSSModuleExample = (props: any) => {
|
4330 | const cssModule = {
|
4331 | btn: 'hash',
|
4332 | };
|
4333 |
|
4334 | return (
|
4335 | <Button color="secondary" cssModule={cssModule}>
|
4336 | Button
|
4337 | </Button>
|
4338 | );
|
4339 | };
|
4340 |
|
4341 | class Example107 extends React.Component {
|
4342 | private input: HTMLInputElement | null;
|
4343 |
|
4344 | render() {
|
4345 | return (
|
4346 | <Input
|
4347 | type="file"
|
4348 | innerRef={(input: HTMLInputElement) => {
|
4349 | this.input = input;
|
4350 | }}
|
4351 | />
|
4352 | );
|
4353 | }
|
4354 | }
|
4355 |
|
4356 | class Example108 extends React.Component<any, any> {
|
4357 | state: any;
|
4358 | constructor(props: any) {
|
4359 | super(props);
|
4360 |
|
4361 | this.toggle = this.toggle.bind(this);
|
4362 | this.state = {
|
4363 | isOpen: false,
|
4364 | };
|
4365 | }
|
4366 | toggle() {
|
4367 | this.setState({
|
4368 | isOpen: !this.state.isOpen,
|
4369 | });
|
4370 | }
|
4371 | render() {
|
4372 | return (
|
4373 | <div>
|
4374 | <Navbar color="faded" dark expand>
|
4375 | <NavbarToggler onClick={this.toggle} />
|
4376 | <NavbarBrand href="/">reactstrap</NavbarBrand>
|
4377 | <Collapse isOpen={this.state.isOpen} navbar>
|
4378 | <Nav className="ms-auto" navbar>
|
4379 | <NavItem>
|
4380 | <NavLink href="/components/">Components</NavLink>
|
4381 | </NavItem>
|
4382 | <NavItem>
|
4383 | <NavLink href="https://github.com/reactstrap/reactstrap">
|
4384 | Github
|
4385 | </NavLink>
|
4386 | </NavItem>
|
4387 | </Nav>
|
4388 | </Collapse>
|
4389 | </Navbar>
|
4390 | </div>
|
4391 | );
|
4392 | }
|
4393 | }
|
4394 |
|
4395 | class Example109 extends React.Component<any, any> {
|
4396 | state: any;
|
4397 | constructor(props: any) {
|
4398 | super(props);
|
4399 |
|
4400 | this.toggle = this.toggle.bind(this);
|
4401 | this.state = {
|
4402 | isOpen: false,
|
4403 | };
|
4404 | }
|
4405 | toggle() {
|
4406 | this.setState({
|
4407 | isOpen: !this.state.isOpen,
|
4408 | });
|
4409 | }
|
4410 | render() {
|
4411 | return (
|
4412 | <div>
|
4413 | <Navbar color="faded" light expand>
|
4414 | <NavbarToggler onClick={this.toggle} />
|
4415 | <NavbarBrand href="/">reactstrap</NavbarBrand>
|
4416 | <Collapse isOpen={this.state.isOpen} navbar>
|
4417 | <Nav className="ms-auto" navbar>
|
4418 | <NavItem>
|
4419 | <NavLink href="/components/">Components</NavLink>
|
4420 | </NavItem>
|
4421 | <NavItem>
|
4422 | <NavLink href="https://github.com/reactstrap/reactstrap">
|
4423 | Github
|
4424 | </NavLink>
|
4425 | </NavItem>
|
4426 | </Nav>
|
4427 | </Collapse>
|
4428 | </Navbar>
|
4429 | </div>
|
4430 | );
|
4431 | }
|
4432 | }
|
4433 |
|
4434 | class Example110 extends React.Component<any, any> {
|
4435 | state: any;
|
4436 | constructor(props: any) {
|
4437 | super(props);
|
4438 |
|
4439 | this.toggle = this.toggle.bind(this);
|
4440 | this.state = {
|
4441 | isOpen: false,
|
4442 | };
|
4443 | }
|
4444 | toggle() {
|
4445 | this.setState({
|
4446 | isOpen: !this.state.isOpen,
|
4447 | });
|
4448 | }
|
4449 | render() {
|
4450 | return (
|
4451 | <div>
|
4452 | <Navbar color="faded" light expand="md">
|
4453 | <NavbarToggler onClick={this.toggle} />
|
4454 | <NavbarBrand href="/">reactstrap</NavbarBrand>
|
4455 | <Collapse isOpen={this.state.isOpen} navbar>
|
4456 | <Nav className="ms-auto" navbar>
|
4457 | <NavItem>
|
4458 | <NavLink href="/components/">Components</NavLink>
|
4459 | </NavItem>
|
4460 | <NavItem>
|
4461 | <NavLink href="https://github.com/reactstrap/reactstrap">
|
4462 | Github
|
4463 | </NavLink>
|
4464 | </NavItem>
|
4465 | </Nav>
|
4466 | </Collapse>
|
4467 | </Navbar>
|
4468 | </div>
|
4469 | );
|
4470 | }
|
4471 | }
|
4472 |
|
4473 | class Example111 extends React.Component<any, any> {
|
4474 | state: any;
|
4475 | constructor(props: any) {
|
4476 | super(props);
|
4477 |
|
4478 | this.toggle = this.toggle.bind(this);
|
4479 | this.state = {
|
4480 | isOpen: false,
|
4481 | };
|
4482 | }
|
4483 | toggle() {
|
4484 | this.setState({
|
4485 | isOpen: !this.state.isOpen,
|
4486 | });
|
4487 | }
|
4488 | render() {
|
4489 | return (
|
4490 | <div>
|
4491 | <Navbar color="faded" light expand="md">
|
4492 | <NavbarToggler onClick={this.toggle} />
|
4493 | <NavbarBrand tag="a" href="/">
|
4494 | reactstrap
|
4495 | </NavbarBrand>
|
4496 | <Collapse isOpen={this.state.isOpen} navbar>
|
4497 | <Nav className="ms-auto" navbar>
|
4498 | <NavItem>
|
4499 | <NavLink href="/components/">Components</NavLink>
|
4500 | </NavItem>
|
4501 | <NavItem>
|
4502 | <NavLink href="https://github.com/reactstrap/reactstrap">
|
4503 | Github
|
4504 | </NavLink>
|
4505 | </NavItem>
|
4506 | </Nav>
|
4507 | </Collapse>
|
4508 | </Navbar>
|
4509 | </div>
|
4510 | );
|
4511 | }
|
4512 | }
|
4513 |
|
4514 | class Example112 extends React.Component<any, any> {
|
4515 | state: any;
|
4516 | constructor(props: any) {
|
4517 | super(props);
|
4518 |
|
4519 | this.toggle = this.toggle.bind(this);
|
4520 | this.state = {
|
4521 | isOpen: false,
|
4522 | };
|
4523 | }
|
4524 | toggle() {
|
4525 | this.setState({
|
4526 | isOpen: !this.state.isOpen,
|
4527 | });
|
4528 | }
|
4529 | render() {
|
4530 | return (
|
4531 | <div>
|
4532 | <Navbar color="faded" light expand="md">
|
4533 | <NavbarToggler onClick={this.toggle} />
|
4534 | <NavbarBrand className="logo" href="/">
|
4535 | reactstrap
|
4536 | </NavbarBrand>
|
4537 | <Collapse isOpen={this.state.isOpen} navbar>
|
4538 | <Nav className="ms-auto" navbar>
|
4539 | <NavItem>
|
4540 | <NavLink href="/components/">Components</NavLink>
|
4541 | </NavItem>
|
4542 | <NavItem>
|
4543 | <NavLink href="https://github.com/reactstrap/reactstrap">
|
4544 | Github
|
4545 | </NavLink>
|
4546 | </NavItem>
|
4547 | </Nav>
|
4548 | </Collapse>
|
4549 | </Navbar>
|
4550 | </div>
|
4551 | );
|
4552 | }
|
4553 | }
|
4554 |
|
4555 | const Example113 = (props: any) => {
|
4556 | return (
|
4557 | <div>
|
4558 | <Card>
|
4559 | <CardBody>
|
4560 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus
|
4561 | terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer
|
4562 | labore wes anderson cred nesciunt sapiente ea proident.
|
4563 | </CardBody>
|
4564 | </Card>
|
4565 | </div>
|
4566 | );
|
4567 | };
|
4568 |
|
4569 | class Example114 extends React.Component<any, any> {
|
4570 | private element: HTMLElement;
|
4571 |
|
4572 | refFn(r: HTMLElement | null) {
|
4573 | if (r) {
|
4574 | this.element = r;
|
4575 | }
|
4576 | }
|
4577 |
|
4578 | render() {
|
4579 | return (
|
4580 | <div>
|
4581 | <p>
|
4582 | Somewhere in here is a{' '}
|
4583 | <a href="#" ref={this.refFn}>
|
4584 | tooltip
|
4585 | </a>
|
4586 | .
|
4587 | </p>
|
4588 | <Tooltip
|
4589 | placement="bottom-start"
|
4590 | isOpen={this.state.tooltipOpen}
|
4591 | target={this.element}
|
4592 | >
|
4593 | Hello world!
|
4594 | </Tooltip>
|
4595 | </div>
|
4596 | );
|
4597 | }
|
4598 | }
|
4599 |
|
4600 | class Example115 extends React.Component<any, any> {
|
4601 |
|
4602 |
|
4603 | private readonly items = [
|
4604 | {
|
4605 | src: 'data:image/svg+xml...',
|
4606 | altText: 'Slide 1',
|
4607 | caption: 'Slide 1',
|
4608 | },
|
4609 | {
|
4610 | src: 'data:image/svg+xml...',
|
4611 | altText: 'Slide 2',
|
4612 | caption: 'Slide 2',
|
4613 | },
|
4614 | {
|
4615 | src: 'data:image/svg+xml...',
|
4616 | altText: 'Slide 3',
|
4617 | caption: 'Slide 3',
|
4618 | },
|
4619 | ];
|
4620 |
|
4621 | private animating: boolean;
|
4622 |
|
4623 | state: any;
|
4624 | constructor(props: any) {
|
4625 | super(props);
|
4626 | this.state = { activeIndex: 0 };
|
4627 | this.next = this.next.bind(this);
|
4628 | this.previous = this.previous.bind(this);
|
4629 | this.goToIndex = this.goToIndex.bind(this);
|
4630 | this.onExiting = this.onExiting.bind(this);
|
4631 | this.onExited = this.onExited.bind(this);
|
4632 | }
|
4633 |
|
4634 | onExiting() {
|
4635 | this.animating = true;
|
4636 | }
|
4637 |
|
4638 | onExited() {
|
4639 | this.animating = false;
|
4640 | }
|
4641 |
|
4642 | next() {
|
4643 | if (this.animating) return;
|
4644 | const nextIndex =
|
4645 | this.state.activeIndex === this.items.length - 1
|
4646 | ? 0
|
4647 | : this.state.activeIndex + 1;
|
4648 | this.setState({ activeIndex: nextIndex });
|
4649 | }
|
4650 |
|
4651 | previous() {
|
4652 | if (this.animating) return;
|
4653 | const nextIndex =
|
4654 | this.state.activeIndex === 0
|
4655 | ? this.items.length - 1
|
4656 | : this.state.activeIndex - 1;
|
4657 | this.setState({ activeIndex: nextIndex });
|
4658 | }
|
4659 |
|
4660 | goToIndex(newIndex: number) {
|
4661 | if (this.animating) return;
|
4662 | this.setState({ activeIndex: newIndex });
|
4663 | }
|
4664 |
|
4665 | render() {
|
4666 | const { activeIndex } = this.state;
|
4667 |
|
4668 | const slides = this.items.map((item) => {
|
4669 | return (
|
4670 | <CarouselItem
|
4671 | onExiting={this.onExiting}
|
4672 | onExited={this.onExited}
|
4673 | key={item.src}
|
4674 | >
|
4675 | <img src={item.src} alt={item.altText} />
|
4676 | <CarouselCaption
|
4677 | captionText={item.caption}
|
4678 | captionHeader={item.caption}
|
4679 | />
|
4680 | </CarouselItem>
|
4681 | );
|
4682 | });
|
4683 |
|
4684 | return (
|
4685 | <Carousel
|
4686 | activeIndex={activeIndex}
|
4687 | next={this.next}
|
4688 | previous={this.previous}
|
4689 | >
|
4690 | <CarouselIndicators
|
4691 | items={this.items}
|
4692 | activeIndex={activeIndex}
|
4693 | onClickHandler={this.goToIndex}
|
4694 | />
|
4695 | {slides}
|
4696 | <CarouselControl
|
4697 | direction="prev"
|
4698 | directionText="Previous"
|
4699 | onClickHandler={this.previous}
|
4700 | />
|
4701 | <CarouselControl
|
4702 | direction="next"
|
4703 | directionText="Next"
|
4704 | onClickHandler={this.next}
|
4705 | />
|
4706 | </Carousel>
|
4707 | );
|
4708 | }
|
4709 | }
|
4710 |
|
4711 | const Example116 = (props: any) => {
|
4712 | return (
|
4713 | <div>
|
4714 | <InputGroup>
|
4715 | <Button>I'm a button</Button>
|
4716 | <Input />
|
4717 | </InputGroup>
|
4718 | <br />
|
4719 | </div>
|
4720 | );
|
4721 | };
|
4722 |
|
4723 | function Example117() {
|
4724 | const ref = (e: any) => {};
|
4725 |
|
4726 | <Button ref={ref} />;
|
4727 | <Carousel ref={ref} next={null as any} previous={null as any} />;
|
4728 | <CarouselItem ref={ref} />;
|
4729 | <Collapse ref={ref} />;
|
4730 | <Dropdown ref={ref} />;
|
4731 | <DropdownItem ref={ref} />;
|
4732 | <DropdownToggle ref={ref} />;
|
4733 | <Form ref={ref} />;
|
4734 | <Input ref={ref} />;
|
4735 | <Modal ref={ref} />;
|
4736 | <NavLink ref={ref} />;
|
4737 | <TabContent ref={ref} />;
|
4738 | <Tooltip ref={ref} target={null as any} />;
|
4739 | <UncontrolledAlert ref={ref} />;
|
4740 | <UncontrolledButtonDropdown ref={ref} />;
|
4741 | <UncontrolledDropdown ref={ref} />;
|
4742 | <UncontrolledTooltip ref={ref} target={null as any} />;
|
4743 | <UncontrolledCollapse ref={ref} target={null as any} toggler="#foobar" />;
|
4744 | }
|
4745 |
|
4746 | function Example118() {
|
4747 | const ref: React.Ref<any> = React.createRef();
|
4748 |
|
4749 | <Button innerRef={ref} />;
|
4750 | <CardLink innerRef={ref} />;
|
4751 | <Form innerRef={ref} />;
|
4752 | <Input innerRef={ref} />;
|
4753 | <NavLink innerRef={ref} />;
|
4754 | }
|
4755 |
|
4756 | import { default as Alert_ } from './lib/Alert';
|
4757 | import { default as Badge_ } from './lib/Badge';
|
4758 | import { default as Breadcrumb_ } from './lib/Breadcrumb';
|
4759 | import { default as BreadcrumbItem_ } from './lib/BreadcrumbItem';
|
4760 | import {
|
4761 | default as Button_,
|
4762 | ButtonProps,
|
4763 | } from './lib/Button';
|
4764 | import { default as ButtonDropdown_ } from './lib/ButtonDropdown';
|
4765 | import { default as ButtonGroup_ } from './lib/ButtonGroup';
|
4766 | import { default as ButtonToolbar_ } from './lib/ButtonToolbar';
|
4767 | import { default as Card_ } from './lib/Card';
|
4768 | import { default as CardBody_ } from './lib/CardBody';
|
4769 | import { default as CardColumns_ } from './lib/CardColumns';
|
4770 | import { default as CardDeck_ } from './lib/CardDeck';
|
4771 | import { default as CardFooter_ } from './lib/CardFooter';
|
4772 | import { default as CardGroup_ } from './lib/CardGroup';
|
4773 | import { default as CardHeader_ } from './lib/CardHeader';
|
4774 | import { default as CardImg_ } from './lib/CardImg';
|
4775 | import { default as CardImgOverlay_ } from './lib/CardImgOverlay';
|
4776 | import { default as CardLink_ } from './lib/CardLink';
|
4777 | import { default as CardSubtitle_ } from './lib/CardSubtitle';
|
4778 | import { default as CardText_ } from './lib/CardText';
|
4779 | import { default as CardTitle_ } from './lib/CardTitle';
|
4780 | import { default as Carousel_ } from './lib/Carousel';
|
4781 | import { default as CarouselItem_ } from './lib/CarouselItem';
|
4782 | import { default as CarouselControl_ } from './lib/CarouselControl';
|
4783 | import { default as CarouselIndicators_ } from './lib/CarouselIndicators';
|
4784 | import { default as CarouselCaption_ } from './lib/CarouselCaption';
|
4785 | import { default as Col_ } from './lib/Col';
|
4786 | import { default as Collapse_ } from './lib/Collapse';
|
4787 | import { default as Container_ } from './lib/Container';
|
4788 | import { default as Dropdown_ } from './lib/Dropdown';
|
4789 | import { default as DropdownItem_ } from './lib/DropdownItem';
|
4790 | import { default as DropdownMenu_ } from './lib/DropdownMenu';
|
4791 | import { default as DropdownToggle_ } from './lib/DropdownToggle';
|
4792 | import { default as Fade_ } from './lib/Fade';
|
4793 | import { default as Form_ } from './lib/Form';
|
4794 | import { default as FormFeedback_ } from './lib/FormFeedback';
|
4795 | import { default as FormGroup_ } from './lib/FormGroup';
|
4796 | import { default as FormText_ } from './lib/FormText';
|
4797 | import { default as Input_ } from './lib/Input';
|
4798 | import { default as InputGroup_ } from './lib/InputGroup';
|
4799 | import { default as InputGroupText_ } from './lib/InputGroupText';
|
4800 | import { default as Label_ } from './lib/Label';
|
4801 | import { default as ListGroup_ } from './lib/ListGroup';
|
4802 | import { default as ListGroupItem_ } from './lib/ListGroupItem';
|
4803 | import { default as ListGroupItemHeading_ } from './lib/ListGroupItemHeading';
|
4804 | import { default as ListGroupItemText_ } from './lib/ListGroupItemText';
|
4805 | import { default as Media_ } from './lib/Media';
|
4806 | import { default as Modal_ } from './lib/Modal';
|
4807 | import { default as ModalBody_ } from './lib/ModalBody';
|
4808 | import { default as ModalFooter_ } from './lib/ModalFooter';
|
4809 | import { default as ModalHeader_ } from './lib/ModalHeader';
|
4810 | import { default as Nav_ } from './lib/Nav';
|
4811 | import { default as Navbar_ } from './lib/Navbar';
|
4812 | import { default as NavbarBrand_ } from './lib/NavbarBrand';
|
4813 | import { default as NavbarToggler_ } from './lib/NavbarToggler';
|
4814 | import { default as NavItem_ } from './lib/NavItem';
|
4815 | import { default as NavLink_ } from './lib/NavLink';
|
4816 | import { default as Pagination_ } from './lib/Pagination';
|
4817 | import { default as PaginationItem_ } from './lib/PaginationItem';
|
4818 | import { default as PaginationLink_ } from './lib/PaginationLink';
|
4819 | import { default as Popover_ } from './lib/Popover';
|
4820 | import { default as PopoverBody_ } from './lib/PopoverBody';
|
4821 | import { default as PopoverHeader_ } from './lib/PopoverHeader';
|
4822 | import { default as Progress_ } from './lib/Progress';
|
4823 | import { default as Row_ } from './lib/Row';
|
4824 | import { default as TabContent_ } from './lib/TabContent';
|
4825 | import { default as Table_ } from './lib/Table';
|
4826 | import { default as TabPane_ } from './lib/TabPane';
|
4827 | import { default as Tag_ } from './lib/Tag';
|
4828 | import { default as Tooltip_ } from './lib/Tooltip';
|
4829 | import { UncontrolledAlert as UncontrolledAlert_ } from './lib/Uncontrolled';
|
4830 | import { UncontrolledButtonDropdown as UncontrolledButtonDropdown_ } from './lib/Uncontrolled';
|
4831 | import { UncontrolledDropdown as UncontrolledDropdown_ } from './lib/Uncontrolled';
|
4832 | import { UncontrolledTooltip as UncontrolledTooltip_ } from './lib/Uncontrolled';
|
4833 | import { UncontrolledCollapse as UncontrolledCollapse_ } from './lib/Uncontrolled';
|
4834 |
|
4835 | function AnyPropExample() {
|
4836 | return (
|
4837 | <React.Fragment>
|
4838 | <Alert_ foo={1} bar={false} foobar="example" />
|
4839 | <Badge_ foo={1} bar={false} foobar="example" />
|
4840 | <Breadcrumb_ foo={1} bar={false} foobar="example" />
|
4841 | <BreadcrumbItem_ foo={1} bar={false} foobar="example" />
|
4842 | <Button_ foo={1} bar={false} foobar="example" />
|
4843 | <ButtonDropdown_ foo={1} bar={false} foobar="example" />
|
4844 | <ButtonGroup_ foo={1} bar={false} foobar="example" />
|
4845 | <ButtonToolbar_ foo={1} bar={false} foobar="example" />
|
4846 | <Card_ foo={1} bar={false} foobar="example" />
|
4847 | <CardBody_ foo={1} bar={false} foobar="example" />
|
4848 | <CardColumns_ foo={1} bar={false} foobar="example" />
|
4849 | <CardDeck_ foo={1} bar={false} foobar="example" />
|
4850 | <CardFooter_ foo={1} bar={false} foobar="example" />
|
4851 | <CardGroup_ foo={1} bar={false} foobar="example" />
|
4852 | <CardHeader_ foo={1} bar={false} foobar="example" />
|
4853 | <CardImg_ foo={1} bar={false} foobar="example" />
|
4854 | <CardImgOverlay_ foo={1} bar={false} foobar="example" />
|
4855 | <CardLink_ foo={1} bar={false} foobar="example" />
|
4856 | <CardSubtitle_ foo={1} bar={false} foobar="example" />
|
4857 | <CardText_ foo={1} bar={false} foobar="example" />
|
4858 | <CardTitle_ foo={1} bar={false} foobar="example" />
|
4859 | <Carousel_
|
4860 | foo={1}
|
4861 | bar={false}
|
4862 | foobar="example"
|
4863 | next={() => {}}
|
4864 | previous={() => {}}
|
4865 | />
|
4866 | <CarouselItem_ foo={1} bar={false} foobar="example" />
|
4867 | <CarouselControl_
|
4868 | foo={1}
|
4869 | bar={false}
|
4870 | foobar="example"
|
4871 | direction="next"
|
4872 | onClickHandler={() => {}}
|
4873 | directionText=""
|
4874 | />
|
4875 | <CarouselIndicators_
|
4876 | foo={1}
|
4877 | bar={false}
|
4878 | foobar="example"
|
4879 | items={[]}
|
4880 | activeIndex={-1}
|
4881 | onClickHandler={() => {}}
|
4882 | />
|
4883 | <CarouselCaption_ foo={1} bar={false} foobar="example" captionText="" />
|
4884 | <Col_ foo={1} bar={false} foobar="example" />
|
4885 | <Collapse_ foo={1} bar={false} foobar="example" />
|
4886 | <Container_ foo={1} bar={false} foobar="example" />
|
4887 | <Dropdown_ foo={1} bar={false} foobar="example" />
|
4888 | <DropdownItem_ foo={1} bar={false} foobar="example" />
|
4889 | <DropdownMenu_ foo={1} bar={false} foobar="example" />
|
4890 | <DropdownToggle_ foo={1} bar={false} foobar="example" />
|
4891 | <Fade_ foo={1} bar={false} foobar="example" />
|
4892 | <Form_ foo={1} bar={false} foobar="example" />
|
4893 | <FormFeedback_ foo={1} bar={false} foobar="example" />
|
4894 | <FormGroup_ foo={1} bar={false} foobar="example" />
|
4895 | <FormText_ foo={1} bar={false} foobar="example" />
|
4896 | <Input_ foo={1} bar={false} foobar="example" />
|
4897 | <InputGroup_ foo={1} bar={false} foobar="example" />
|
4898 | <InputGroupText_ foo={1} bar={false} foobar="example" />
|
4899 | <Label_ foo={1} bar={false} foobar="example" />
|
4900 | <ListGroup_ foo={1} bar={false} foobar="example" />
|
4901 | <ListGroupItem_ foo={1} bar={false} foobar="example" />
|
4902 | <ListGroupItemHeading_ foo={1} bar={false} foobar="example" />
|
4903 | <ListGroupItemText_ foo={1} bar={false} foobar="example" />
|
4904 | <Media_ foo={1} bar={false} foobar="example" />
|
4905 | <Modal_ foo={1} bar={false} foobar="example" />
|
4906 | <ModalBody_ foo={1} bar={false} foobar="example" />
|
4907 | <ModalFooter_ foo={1} bar={false} foobar="example" />
|
4908 | <ModalHeader_ foo={1} bar={false} foobar="example" />
|
4909 | <Nav_ foo={1} bar={false} foobar="example" />
|
4910 | <Navbar_ foo={1} bar={false} foobar="example" />
|
4911 | <NavbarBrand_ foo={1} bar={false} foobar="example" />
|
4912 | <NavbarToggler_ foo={1} bar={false} foobar="example" />
|
4913 | <NavItem_ foo={1} bar={false} foobar="example" />
|
4914 | <NavLink_ foo={1} bar={false} foobar="example" />
|
4915 | <Pagination_ foo={1} bar={false} foobar="example" />
|
4916 | <PaginationItem_ foo={1} bar={false} foobar="example" />
|
4917 | <PaginationLink_ foo={1} bar={false} foobar="example" />
|
4918 | <Popover_ foo={1} bar={false} foobar="example" target="" />
|
4919 | <PopoverBody_ foo={1} bar={false} foobar="example" />
|
4920 | <PopoverHeader_ foo={1} bar={false} foobar="example" />
|
4921 | <Progress_ foo={1} bar={false} foobar="example" />
|
4922 | <Row_ foo={1} bar={false} foobar="example" />
|
4923 | <TabContent_ foo={1} bar={false} foobar="example" />
|
4924 | <Table_ foo={1} bar={false} foobar="example" />
|
4925 | <TabPane_ foo={1} bar={false} foobar="example" />
|
4926 | <Tag_ foo={1} bar={false} foobar="example" />
|
4927 | <Tooltip_ foo={1} bar={false} foobar="example" target="" />
|
4928 | <UncontrolledAlert_ foo={1} bar={false} foobar="example" />
|
4929 | <UncontrolledButtonDropdown_ foo={1} bar={false} foobar="example" />
|
4930 | <UncontrolledDropdown_ foo={1} bar={false} foobar="example" />
|
4931 | <UncontrolledTooltip_ foo={1} bar={false} foobar="example" target="" />
|
4932 | <UncontrolledCollapse_
|
4933 | foo={1}
|
4934 | bar={false}
|
4935 | foobar="example"
|
4936 | target=""
|
4937 | toggler="#foobar"
|
4938 | />
|
4939 | </React.Fragment>
|
4940 | );
|
4941 | }
|
4942 |
|
4943 | interface GenericInterface {
|
4944 | foo: number;
|
4945 | bar: boolean;
|
4946 | foobar?: string;
|
4947 | }
|
4948 |
|
4949 | class Example120 extends React.Component<any, any> {
|
4950 | render() {
|
4951 | return (
|
4952 | <Table borderless>
|
4953 | <thead>
|
4954 | <tr>
|
4955 | <th>#</th>
|
4956 | <th>First Name</th>
|
4957 | <th>Last Name</th>
|
4958 | <th>Username</th>
|
4959 | </tr>
|
4960 | </thead>
|
4961 | <tbody>
|
4962 | <tr>
|
4963 | <th scope="row">1</th>
|
4964 | <td>Mark</td>
|
4965 | <td>Otto</td>
|
4966 | <td>@mdo</td>
|
4967 | </tr>
|
4968 | <tr>
|
4969 | <th scope="row">2</th>
|
4970 | <td>Jacob</td>
|
4971 | <td>Thornton</td>
|
4972 | <td>@fat</td>
|
4973 | </tr>
|
4974 | <tr>
|
4975 | <th scope="row">3</th>
|
4976 | <td>Larry</td>
|
4977 | <td>the Bird</td>
|
4978 | <td>@twitter</td>
|
4979 | </tr>
|
4980 | </tbody>
|
4981 | </Table>
|
4982 | );
|
4983 | }
|
4984 | }
|
4985 |
|
4986 | class Example121 extends React.Component<any, any> {
|
4987 | render() {
|
4988 | return (
|
4989 | <UncontrolledDropdown className="some-class" setActiveFromChild>
|
4990 | <DropdownToggle caret>Dropdown</DropdownToggle>
|
4991 | <DropdownMenu>
|
4992 | <DropdownItem header>Header</DropdownItem>
|
4993 | <DropdownItem disabled>Action</DropdownItem>
|
4994 | <DropdownItem>Another Action</DropdownItem>
|
4995 | <DropdownItem divider />
|
4996 | <DropdownItem>Another Action</DropdownItem>
|
4997 | </DropdownMenu>
|
4998 | </UncontrolledDropdown>
|
4999 | );
|
5000 | }
|
5001 | }
|
5002 |
|
5003 | class Example122 extends React.Component<any, any> {
|
5004 | state: any;
|
5005 | constructor(props: any) {
|
5006 | super(props);
|
5007 |
|
5008 | this.toggle = this.toggle.bind(this);
|
5009 | this.state = {
|
5010 | dropdownOpen: false,
|
5011 | };
|
5012 | }
|
5013 |
|
5014 | toggle() {
|
5015 | this.setState({
|
5016 | dropdownOpen: !this.state.dropdownOpen,
|
5017 | });
|
5018 | }
|
5019 |
|
5020 | render() {
|
5021 | return (
|
5022 | <Dropdown isOpen={this.state.dropdownOpen} toggle={this.toggle}>
|
5023 | <DropdownToggle caret>Dropdown</DropdownToggle>
|
5024 | <DropdownMenu persist>
|
5025 | <DropdownItem header>Header</DropdownItem>
|
5026 | <DropdownItem disabled>Action</DropdownItem>
|
5027 | <DropdownItem>Another Action</DropdownItem>
|
5028 | <DropdownItem divider />
|
5029 | <DropdownItem>Another Action</DropdownItem>
|
5030 | </DropdownMenu>
|
5031 | </Dropdown>
|
5032 | );
|
5033 | }
|
5034 | }
|
5035 |
|
5036 | function Example123() {
|
5037 | return (
|
5038 | <div>
|
5039 | <Button color="primary" id="toggler" style={{ marginBottom: '1rem' }}>
|
5040 | Toggle
|
5041 | </Button>
|
5042 | <UncontrolledCollapse toggler="#toggler">
|
5043 | <Card>
|
5044 | <CardBody>
|
5045 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Nesciunt
|
5046 | magni, voluptas debitis similique porro a molestias consequuntur
|
5047 | earum odio officiis natus, amet hic, iste sed dignissimos esse fuga!
|
5048 | Minus, alias.
|
5049 | </CardBody>
|
5050 | </Card>
|
5051 | </UncontrolledCollapse>
|
5052 | </div>
|
5053 | );
|
5054 | }
|
5055 |
|
5056 | function Example124() {
|
5057 |
|
5058 | const items = [
|
5059 | {
|
5060 | src: 'data:image/svg+xml...',
|
5061 | altText: 'Slide 1',
|
5062 | caption: 'Slide 1',
|
5063 | },
|
5064 | {
|
5065 | src: 'data:image/svg+xml...',
|
5066 | altText: 'Slide 2',
|
5067 | caption: 'Slide 2',
|
5068 | },
|
5069 | {
|
5070 | src: 'data:image/svg+xml...',
|
5071 | altText: 'Slide 3',
|
5072 | caption: 'Slide 3',
|
5073 | },
|
5074 | ];
|
5075 |
|
5076 | return <UncontrolledCarousel items={items} />;
|
5077 | }
|
5078 |
|
5079 | function Example125() {
|
5080 | return (
|
5081 | <div>
|
5082 | <Spinner />
|
5083 | <Spinner color="primary" />
|
5084 | <Spinner size="sm" />
|
5085 | <Spinner type="grow" />
|
5086 | <Spinner color="success" size="sm" type="grow" />
|
5087 | <Spinner className="customClass" />
|
5088 | </div>
|
5089 | );
|
5090 | }
|
5091 |
|
5092 | function Example126() {
|
5093 | return (
|
5094 | <div>
|
5095 | <UncontrolledPopover
|
5096 | placement="bottom"
|
5097 | target="UncontrolledPopover"
|
5098 | popperClassName="popperClassName"
|
5099 | >
|
5100 | <PopoverHeader>Popover Title</PopoverHeader>
|
5101 | <PopoverBody>Lorem ipsum dolor sit amet</PopoverBody>
|
5102 | </UncontrolledPopover>
|
5103 | <UncontrolledPopover
|
5104 | defaultOpen={true}
|
5105 | placement="bottom"
|
5106 | target="UncontrolledPopover"
|
5107 | >
|
5108 | <PopoverHeader>Popover Title</PopoverHeader>
|
5109 | <PopoverBody>Lorem ipsum dolor sit amet</PopoverBody>
|
5110 | </UncontrolledPopover>
|
5111 | </div>
|
5112 | );
|
5113 | }
|
5114 |
|
5115 | function Example127() {
|
5116 | return (
|
5117 | <div>
|
5118 | <Toast>
|
5119 | <ToastHeader icon="primary">Reactstrap</ToastHeader>
|
5120 | <ToastBody>
|
5121 | This is a toast with a primary icon — check it out!
|
5122 | </ToastBody>
|
5123 | </Toast>
|
5124 | <Toast fade={false}>
|
5125 | <ToastHeader icon={<Spinner />} toggle={() => {}}>
|
5126 | Reactstrap
|
5127 | </ToastHeader>
|
5128 | <ToastBody>
|
5129 | This is a toast with a custom icon — check it out!
|
5130 | </ToastBody>
|
5131 | </Toast>
|
5132 | </div>
|
5133 | );
|
5134 | }
|
5135 |
|
5136 | function Example128() {
|
5137 | return (
|
5138 | <Form>
|
5139 | <Row>
|
5140 | <Col md={6}>
|
5141 | <FormGroup>
|
5142 | <Label for="exampleEmail">Email</Label>
|
5143 | <Input
|
5144 | type="email"
|
5145 | name="email"
|
5146 | id="exampleEmail"
|
5147 | placeholder="with a placeholder"
|
5148 | />
|
5149 | </FormGroup>
|
5150 | </Col>
|
5151 | <Col md={6}>
|
5152 | <FormGroup>
|
5153 | <Label for="examplePassword">Password</Label>
|
5154 | <Input
|
5155 | type="password"
|
5156 | name="password"
|
5157 | id="examplePassword"
|
5158 | placeholder="password placeholder"
|
5159 | />
|
5160 | </FormGroup>
|
5161 | </Col>
|
5162 | </Row>
|
5163 | </Form>
|
5164 | );
|
5165 | }
|
5166 |
|
5167 | class Example129 extends React.Component<any, any> {
|
5168 | constructor(props: any) {
|
5169 | super(props);
|
5170 |
|
5171 | this.toggle = this.toggle.bind(this);
|
5172 | this.state = {
|
5173 | dropdownOpen: false,
|
5174 | };
|
5175 | }
|
5176 |
|
5177 | toggle() {
|
5178 | this.setState({
|
5179 | dropdownOpen: !this.state.dropdownOpen,
|
5180 | });
|
5181 | }
|
5182 |
|
5183 | render() {
|
5184 | return (
|
5185 | <Dropdown isOpen={this.state.dropdownOpen} toggle={this.toggle}>
|
5186 | <DropdownToggle caret>Dropdown</DropdownToggle>
|
5187 | <DropdownMenu persist strategy="fixed">
|
5188 | <DropdownItem header>Header</DropdownItem>
|
5189 | <DropdownItem disabled>Action</DropdownItem>
|
5190 | <DropdownItem>Another Action</DropdownItem>
|
5191 | <DropdownItem divider />
|
5192 | <DropdownItem>Another Action</DropdownItem>
|
5193 | </DropdownMenu>
|
5194 | </Dropdown>
|
5195 | );
|
5196 | }
|
5197 | }
|
5198 |
|
5199 | class Example130 extends React.Component {
|
5200 | render() {
|
5201 | return (
|
5202 | <>
|
5203 | <Carousel
|
5204 | activeIndex={1}
|
5205 | next={() => {}}
|
5206 | previous={() => {}}
|
5207 | enableTouch={false}
|
5208 | >
|
5209 | <CarouselIndicators
|
5210 | items={[]}
|
5211 | activeIndex={1}
|
5212 | onClickHandler={() => {}}
|
5213 | />
|
5214 | <CarouselControl
|
5215 | direction="prev"
|
5216 | directionText="Previous"
|
5217 | onClickHandler={() => {}}
|
5218 | />
|
5219 | <CarouselControl
|
5220 | direction="next"
|
5221 | directionText="Next"
|
5222 | onClickHandler={() => {}}
|
5223 | />
|
5224 | </Carousel>
|
5225 | <Carousel
|
5226 | activeIndex={1}
|
5227 | next={() => {}}
|
5228 | previous={() => {}}
|
5229 | enableTouch={true}
|
5230 | >
|
5231 | <CarouselIndicators
|
5232 | items={[]}
|
5233 | activeIndex={1}
|
5234 | onClickHandler={() => {}}
|
5235 | />
|
5236 | <CarouselControl
|
5237 | direction="prev"
|
5238 | directionText="Previous"
|
5239 | onClickHandler={() => {}}
|
5240 | />
|
5241 | <CarouselControl
|
5242 | direction="next"
|
5243 | directionText="Next"
|
5244 | onClickHandler={() => {}}
|
5245 | />
|
5246 | </Carousel>
|
5247 | <UncontrolledCarousel
|
5248 | activeIndex={1}
|
5249 | next={() => {}}
|
5250 | previous={() => {}}
|
5251 | enableTouch={false}
|
5252 | items={[]}
|
5253 | >
|
5254 | <CarouselIndicators
|
5255 | items={[]}
|
5256 | activeIndex={1}
|
5257 | onClickHandler={() => {}}
|
5258 | />
|
5259 | <CarouselControl
|
5260 | direction="prev"
|
5261 | directionText="Previous"
|
5262 | onClickHandler={() => {}}
|
5263 | />
|
5264 | <CarouselControl
|
5265 | direction="next"
|
5266 | directionText="Next"
|
5267 | onClickHandler={() => {}}
|
5268 | />
|
5269 | </UncontrolledCarousel>
|
5270 | <UncontrolledCarousel
|
5271 | activeIndex={1}
|
5272 | next={() => {}}
|
5273 | previous={() => {}}
|
5274 | enableTouch={true}
|
5275 | items={[]}
|
5276 | >
|
5277 | <CarouselIndicators
|
5278 | items={[]}
|
5279 | activeIndex={1}
|
5280 | onClickHandler={() => {}}
|
5281 | />
|
5282 | <CarouselControl
|
5283 | direction="prev"
|
5284 | directionText="Previous"
|
5285 | onClickHandler={() => {}}
|
5286 | />
|
5287 | <CarouselControl
|
5288 | direction="next"
|
5289 | directionText="Next"
|
5290 | onClickHandler={() => {}}
|
5291 | />
|
5292 | </UncontrolledCarousel>
|
5293 | </>
|
5294 | );
|
5295 | }
|
5296 | }
|
5297 |
|
5298 | const PopoverTestInnerRef = () => {
|
5299 | const target = React.createRef<HTMLButtonElement>();
|
5300 | const container = React.createRef<HTMLDivElement>();
|
5301 | return (
|
5302 | <Popover target={target} container={container}>
|
5303 | Yo!
|
5304 | </Popover>
|
5305 | );
|
5306 | };
|
5307 |
|
5308 | const UncontrolledTooltipTestInnerRef = () => {
|
5309 | const target = React.createRef<HTMLButtonElement>();
|
5310 | const container = React.createRef<HTMLDivElement>();
|
5311 | return (
|
5312 | <UncontrolledTooltip target={target} container={container}>
|
5313 | Yo!
|
5314 | </UncontrolledTooltip>
|
5315 | );
|
5316 | };
|
5317 |
|
5318 | const UtilTest = () => {
|
5319 | Util.setGlobalCssModule({
|
5320 | btn: 'btn2',
|
5321 | });
|
5322 | };
|
5323 |
|
5324 | const ScheduleUpdate = () => {
|
5325 | return (
|
5326 | <>
|
5327 | <UncontrolledPopover
|
5328 | trigger="click"
|
5329 | placement="top"
|
5330 | target="ScheduleUpdateButton"
|
5331 | >
|
5332 | {({ scheduleUpdate }) => <div>test</div>}
|
5333 | </UncontrolledPopover>
|
5334 | <UncontrolledTooltip
|
5335 | placement="top"
|
5336 | target="ScheduleUpdateTooltip"
|
5337 | trigger="click"
|
5338 | >
|
5339 | {({ scheduleUpdate }) => <div>test</div>}
|
5340 | </UncontrolledTooltip>
|
5341 | </>
|
5342 | );
|
5343 | };
|
5344 |
|
5345 | const noop = () => {};
|
5346 |
|
5347 | const htmlProps: Pick<
|
5348 | React.HTMLAttributes<HTMLElement>,
|
5349 | 'id' | 'className' | 'style' | 'onClick'
|
5350 | > = {
|
5351 | id: 'id',
|
5352 | className: 'className',
|
5353 | style: { backgroundColor: '#fff' },
|
5354 | onClick: noop,
|
5355 | };
|
5356 |
|
5357 | const MegaTest = () => {
|
5358 | return (
|
5359 | <>
|
5360 | <Alert ref={React.createRef<Alert>()} {...htmlProps} />
|
5361 | <Badge ref={React.createRef<Badge>()} {...htmlProps} />
|
5362 | <Breadcrumb ref={React.createRef<Breadcrumb>()} {...htmlProps} />
|
5363 | <BreadcrumbItem ref={React.createRef<BreadcrumbItem>()} {...htmlProps} />
|
5364 | <Button ref={React.createRef<Button>()} {...htmlProps} />
|
5365 | <ButtonGroup ref={React.createRef<ButtonGroup>()} {...htmlProps} />
|
5366 | <ButtonToggle ref={React.createRef<ButtonToggle>()} {...htmlProps} />
|
5367 | <ButtonToolbar ref={React.createRef<ButtonToolbar>()} {...htmlProps} />
|
5368 | <Card ref={React.createRef<Card>()} {...htmlProps} />
|
5369 | <CardBody ref={React.createRef<CardBody>()} {...htmlProps} />
|
5370 | <CardColumns ref={React.createRef<CardColumns>()} {...htmlProps} />
|
5371 | <CardDeck ref={React.createRef<CardDeck>()} {...htmlProps} />
|
5372 | <CardFooter ref={React.createRef<CardFooter>()} {...htmlProps} />
|
5373 | <CardGroup ref={React.createRef<CardGroup>()} {...htmlProps} />
|
5374 | <CardHeader ref={React.createRef<CardHeader>()} {...htmlProps} />
|
5375 | <CardImg ref={React.createRef<CardImg>()} {...htmlProps} />
|
5376 | <CardImgOverlay ref={React.createRef<CardImgOverlay>()} {...htmlProps} />
|
5377 | <CardLink ref={React.createRef<CardLink>()} {...htmlProps} />
|
5378 | <CardSubtitle ref={React.createRef<CardSubtitle>()} {...htmlProps} />
|
5379 | <CardText ref={React.createRef<CardText>()} {...htmlProps} />
|
5380 | <CardTitle ref={React.createRef<CardTitle>()} {...htmlProps} />
|
5381 | <Carousel
|
5382 | ref={React.createRef<Carousel>()}
|
5383 | {...htmlProps}
|
5384 | previous={noop}
|
5385 | next={noop}
|
5386 | />
|
5387 | <CarouselCaption
|
5388 | ref={React.createRef<CarouselCaption>()}
|
5389 | {...htmlProps}
|
5390 | captionText="a"
|
5391 | />
|
5392 | <CarouselControl
|
5393 | ref={React.createRef<CarouselControl>()}
|
5394 | {...htmlProps}
|
5395 | direction="next"
|
5396 | onClickHandler={noop}
|
5397 | />
|
5398 | <CarouselIndicators
|
5399 | ref={React.createRef<CarouselIndicators>()}
|
5400 | {...htmlProps}
|
5401 | items={[]}
|
5402 | onClickHandler={noop}
|
5403 | activeIndex={1}
|
5404 | />
|
5405 | <CarouselItem ref={React.createRef<CarouselItem>()} {...htmlProps} />
|
5406 | <Col ref={React.createRef<Col>()} {...htmlProps} />
|
5407 | <Collapse ref={React.createRef<Collapse>()} {...htmlProps} />
|
5408 | <Container ref={React.createRef<Container>()} {...htmlProps} />
|
5409 | <Dropdown ref={React.createRef<Dropdown>()} {...htmlProps} />
|
5410 | <DropdownItem ref={React.createRef<DropdownItem>()} {...htmlProps} />
|
5411 | <DropdownMenu ref={React.createRef<DropdownMenu>()} {...htmlProps} />
|
5412 | <DropdownToggle ref={React.createRef<DropdownToggle>()} {...htmlProps} />
|
5413 | <Fade ref={React.createRef<Fade>()} {...htmlProps} />
|
5414 | <Form ref={React.createRef<Form>()} {...htmlProps} />
|
5415 | <FormFeedback ref={React.createRef<FormFeedback>()} {...htmlProps} />
|
5416 | <FormGroup ref={React.createRef<FormGroup>()} {...htmlProps} />
|
5417 | <FormText ref={React.createRef<FormText>()} {...htmlProps} />
|
5418 | <Input ref={React.createRef<Input>()} {...htmlProps} />
|
5419 | <Input innerRef={React.createRef<HTMLTextAreaElement>()} />
|
5420 | <Input innerRef={React.createRef<HTMLInputElement>()} />
|
5421 | <InputGroup ref={React.createRef<InputGroup>()} {...htmlProps} />
|
5422 | <InputGroupText ref={React.createRef<InputGroupText>()} {...htmlProps} />
|
5423 | <Label ref={React.createRef<Label>()} {...htmlProps} />
|
5424 | <ListGroup ref={React.createRef<ListGroup>()} {...htmlProps} />
|
5425 | <ListGroupItem ref={React.createRef<ListGroupItem>()} {...htmlProps} />
|
5426 | <ListGroupItemHeading
|
5427 | ref={React.createRef<ListGroupItemHeading>()}
|
5428 | {...htmlProps}
|
5429 | />
|
5430 | <ListGroupItemText
|
5431 | ref={React.createRef<ListGroupItemText>()}
|
5432 | {...htmlProps}
|
5433 | />
|
5434 | <Media ref={React.createRef<Media>()} {...htmlProps} />
|
5435 | <Modal ref={React.createRef<Modal>()} {...htmlProps} />
|
5436 | <ModalBody ref={React.createRef<ModalBody>()} {...htmlProps} />
|
5437 | <ModalFooter ref={React.createRef<ModalFooter>()} {...htmlProps} />
|
5438 | <ModalHeader ref={React.createRef<ModalHeader>()} {...htmlProps} />
|
5439 | <Nav ref={React.createRef<Nav>()} {...htmlProps} />
|
5440 | <NavItem ref={React.createRef<NavItem>()} {...htmlProps} />
|
5441 | <NavLink ref={React.createRef<NavLink>()} {...htmlProps} />
|
5442 | <Navbar ref={React.createRef<Navbar>()} {...htmlProps} />
|
5443 | <NavbarBrand ref={React.createRef<NavbarBrand>()} {...htmlProps} />
|
5444 | <NavbarText ref={React.createRef<NavbarText>()} {...htmlProps} />
|
5445 | <NavbarToggler ref={React.createRef<NavbarToggler>()} {...htmlProps} />
|
5446 | <Pagination ref={React.createRef<Pagination>()} {...htmlProps} />
|
5447 | <PaginationItem ref={React.createRef<PaginationItem>()} {...htmlProps} />
|
5448 | <PaginationLink ref={React.createRef<PaginationLink>()} {...htmlProps} />
|
5449 | <Popover ref={React.createRef<Popover>()} {...htmlProps} target="a" />
|
5450 | <PopoverBody ref={React.createRef<PopoverBody>()} {...htmlProps} />
|
5451 | <PopoverHeader ref={React.createRef<PopoverHeader>()} {...htmlProps} />
|
5452 | <Progress ref={React.createRef<Progress>()} {...htmlProps} />
|
5453 | <Row ref={React.createRef<Row>()} {...htmlProps} />
|
5454 | <Spinner ref={React.createRef<Spinner>()} {...htmlProps} />
|
5455 | <TabContent ref={React.createRef<TabContent>()} {...htmlProps} />
|
5456 | <TabPane ref={React.createRef<TabPane>()} {...htmlProps} />
|
5457 | <Table ref={React.createRef<Table>()} {...htmlProps} />
|
5458 | <Tag ref={React.createRef<Tag>()} {...htmlProps} />
|
5459 | <Toast ref={React.createRef<Toast>()} {...htmlProps} target="a" />
|
5460 | <ToastBody ref={React.createRef<ToastBody>()} {...htmlProps} />
|
5461 | <ToastHeader ref={React.createRef<ToastHeader>()} {...htmlProps} />
|
5462 | <Tooltip ref={React.createRef<Tooltip>()} {...htmlProps} target="a" />
|
5463 | </>
|
5464 | );
|
5465 | };
|