|
25 | 25 | */ |
26 | 26 |
|
27 | 27 | import React from 'react' |
28 | | -import { Tree, TreeItem, IconButton } from '../..' |
| 28 | +import { Tree, TreeGroup, TreeItem, IconButton } from '../..' |
29 | 29 |
|
30 | 30 | export const LongLabels = () => ( |
31 | 31 | <Tree label="Tree with long labels " icon="ExploreOutline" defaultOpen> |
32 | 32 | <Tree label="Wrapping next" icon="VisibilityOutline" defaultOpen> |
33 | | - <Tree |
34 | | - label="Orders Lorem ipsum dolor sit amet, consectetur adipiscing elit. Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc." |
35 | | - icon="Table" |
36 | | - defaultOpen |
37 | | - > |
38 | | - <TreeItem icon="IdeDimension"> |
39 | | - Lorem ipsum dolor sit amet, consectetur adipiscing elit. |
40 | | - </TreeItem> |
41 | | - <TreeItem icon="IdeDimension"> |
42 | | - Nam sit amet imperdiet lacus, eget ullamcorper nunc. Many desktop |
43 | | - publishing packages and web page editors now use Lorem Ipsum as their |
44 | | - default model text, and a search for 'lorem ipsum' will uncover many |
45 | | - web sites still in their infancy. |
46 | | - </TreeItem> |
47 | | - <TreeItem |
48 | | - icon="IdeDimensionGroup" |
49 | | - detail={ |
50 | | - <IconButton |
51 | | - icon="CircleInfo" |
52 | | - label="Get Info" |
53 | | - onClick={() => alert("You've got info!")} |
54 | | - /> |
55 | | - } |
| 33 | + <TreeGroup label="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc finibus, nulla vitae aliquam placerat, magna quam suscipit sapien, in pretium tellus dolor in nisi. Cras auctor scelerisque ipsum, sit amet faucibus magna bibendum eu. Sed sed tristique nisl, fermentum ultricies libero. Duis non ex nec felis mattis accumsan sed non."> |
| 34 | + <Tree |
| 35 | + label="Orders Lorem ipsum dolor sit amet, consectetur adipiscing elit. Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc." |
| 36 | + icon="Table" |
| 37 | + defaultOpen |
56 | 38 | > |
57 | | - Nunc convallis justo sed turpis interdum rutrum ac a neque. Contrary |
58 | | - to popular belief, Lorem Ipsum is not simply random text. It has roots |
59 | | - in a piece of classical Latin literature from 45 BC, making it over |
60 | | - 2000 years old. |
61 | | - </TreeItem> |
62 | | - </Tree> |
| 39 | + <TreeItem icon="IdeDimension"> |
| 40 | + Lorem ipsum dolor sit amet, consectetur adipiscing elit. |
| 41 | + </TreeItem> |
| 42 | + <TreeItem icon="IdeDimension"> |
| 43 | + Nam sit amet imperdiet lacus, eget ullamcorper nunc. Many desktop |
| 44 | + publishing packages and web page editors now use Lorem Ipsum as |
| 45 | + their default model text, and a search for 'lorem ipsum' will |
| 46 | + uncover many web sites still in their infancy. |
| 47 | + </TreeItem> |
| 48 | + <TreeItem |
| 49 | + icon="IdeDimensionGroup" |
| 50 | + detail={ |
| 51 | + <IconButton |
| 52 | + icon="CircleInfo" |
| 53 | + label="Get Info" |
| 54 | + onClick={() => alert("You've got info!")} |
| 55 | + /> |
| 56 | + } |
| 57 | + > |
| 58 | + Nunc convallis justo sed turpis interdum rutrum ac a neque. Contrary |
| 59 | + to popular belief, Lorem Ipsum is not simply random text. It has |
| 60 | + roots in a piece of classical Latin literature from 45 BC, making it |
| 61 | + over 2000 years old. |
| 62 | + </TreeItem> |
| 63 | + </Tree> |
| 64 | + </TreeGroup> |
63 | 65 | </Tree> |
64 | 66 | <Tree label="Truncated text" icon="VisibilityOutline" defaultOpen> |
65 | | - <Tree |
66 | | - label="Users Lorem ipsum dolor sit amet, consectetur adipiscing elit. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. " |
67 | | - icon="Table" |
| 67 | + <TreeGroup |
68 | 68 | truncate |
69 | | - defaultOpen |
| 69 | + label="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc finibus, nulla vitae aliquam placerat, magna quam suscipit sapien, in pretium tellus dolor in nisi. Cras auctor scelerisque ipsum, sit amet faucibus magna bibendum eu. Sed sed tristique nisl, fermentum ultricies libero. Duis non ex nec felis mattis accumsan sed non." |
70 | 70 | > |
71 | | - <TreeItem icon="IdeDimension" truncate> |
72 | | - <strong>Very long text renders a tooltip.</strong> Vivamus vitae |
73 | | - mauris et erat sagittis tempus. Mauris euismod aliquet arcu ut |
74 | | - viverra. It has roots in a piece of classical Latin literature from 45 |
75 | | - BC, making it over 2000 years old. Richard McClintock, a Latin |
76 | | - professor at Hampden-Sydney College in Virginia, looked up one of the |
77 | | - more obscure Latin words, consectetur, from a Lorem Ipsum passage, and |
78 | | - going through the cites of the word in classical literature, |
79 | | - discovered the undoubtable source. |
80 | | - </TreeItem> |
81 | | - <TreeItem |
82 | | - icon="IdeDimension" |
| 71 | + <Tree |
| 72 | + label="Users Lorem ipsum dolor sit amet, consectetur adipiscing elit. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. " |
| 73 | + icon="Table" |
83 | 74 | truncate |
84 | | - detail={ |
85 | | - <IconButton |
86 | | - icon="CircleInfo" |
87 | | - label="Get Info" |
88 | | - onClick={() => alert("You've got info!")} |
89 | | - /> |
90 | | - } |
| 75 | + defaultOpen |
91 | 76 | > |
92 | | - Quisque euismod risus quis sapien luctus rutrum. Cras a dui luctus, |
93 | | - dictum elit vel, pellentesque nisl. Contrary to popular belief, Lorem |
94 | | - Ipsum is not simply random text. It has roots in a piece of classical |
95 | | - Latin literature from 45 BC, making it over 2000 years old. |
96 | | - </TreeItem> |
97 | | - <TreeItem icon="IdeDimensionGroup" truncate> |
98 | | - This short text should not render a tooltip |
99 | | - </TreeItem> |
100 | | - </Tree> |
| 77 | + <TreeItem icon="IdeDimension" truncate> |
| 78 | + <strong>Very long text renders a tooltip.</strong> Vivamus vitae |
| 79 | + mauris et erat sagittis tempus. Mauris euismod aliquet arcu ut |
| 80 | + viverra. It has roots in a piece of classical Latin literature from |
| 81 | + 45 BC, making it over 2000 years old. Richard McClintock, a Latin |
| 82 | + professor at Hampden-Sydney College in Virginia, looked up one of |
| 83 | + the more obscure Latin words, consectetur, from a Lorem Ipsum |
| 84 | + passage, and going through the cites of the word in classical |
| 85 | + literature, discovered the undoubtable source. |
| 86 | + </TreeItem> |
| 87 | + <TreeItem |
| 88 | + icon="IdeDimension" |
| 89 | + truncate |
| 90 | + detail={ |
| 91 | + <IconButton |
| 92 | + icon="CircleInfo" |
| 93 | + label="Get Info" |
| 94 | + onClick={() => alert("You've got info!")} |
| 95 | + /> |
| 96 | + } |
| 97 | + > |
| 98 | + Quisque euismod risus quis sapien luctus rutrum. Cras a dui luctus, |
| 99 | + dictum elit vel, pellentesque nisl. Contrary to popular belief, |
| 100 | + Lorem Ipsum is not simply random text. It has roots in a piece of |
| 101 | + classical Latin literature from 45 BC, making it over 2000 years |
| 102 | + old. |
| 103 | + </TreeItem> |
| 104 | + <TreeItem icon="IdeDimensionGroup" truncate> |
| 105 | + This short text should not render a tooltip |
| 106 | + </TreeItem> |
| 107 | + </Tree> |
| 108 | + </TreeGroup> |
101 | 109 | </Tree> |
102 | 110 | </Tree> |
103 | 111 | ) |
0 commit comments