From 15007833b11095f9e58482e3fb0e13b831829dba Mon Sep 17 00:00:00 2001 From: GerardoPM Date: Wed, 8 Jun 2022 16:33:05 -0500 Subject: [PATCH] list-group --- .../display/list-group/demo/d01-list-group.md | 157 ++---------------- .../list-group/demo/d02-list-of-links.md | 47 ++++++ .../demo/d03-text-wrapping-and-tooltips.md | 31 ++++ .../demo/d04-list-item-color-and-size.md | 27 +++ 4 files changed, 115 insertions(+), 147 deletions(-) create mode 100644 packages/core/docs/display/list-group/demo/d02-list-of-links.md create mode 100644 packages/core/docs/display/list-group/demo/d03-text-wrapping-and-tooltips.md create mode 100644 packages/core/docs/display/list-group/demo/d04-list-item-color-and-size.md diff --git a/packages/core/docs/display/list-group/demo/d01-list-group.md b/packages/core/docs/display/list-group/demo/d01-list-group.md index 25ba36acc..bf85b47be 100644 --- a/packages/core/docs/display/list-group/demo/d01-list-group.md +++ b/packages/core/docs/display/list-group/demo/d01-list-group.md @@ -1,3 +1,12 @@ +--- +order: 1 +--- + + +

The EuiListGroup component is used to present EuiListGroupItems in a neatly formatted list. Use the flush and bordered properties for full-width and bordered presentations, respectively. +Adjust the gutterSize prop to increase or decrease the spacing between items.

+
+ ```hbs template @@ -47,153 +56,7 @@ -
- Gutter size - none - small - medium -
-
- Max width - - boolean - - - number - - - string - -
-
- {{#if (eq this.maxWidthType 'bool')}} - - - {{else if (eq this.maxWidthType 'num')}} - - - {{else}} - - - {{/if}} -
-
- - First Item -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- Size - extra small - small - medium - large -
-
- Color - inherit - text - subdued - ghost - primary -
-
- - -
+
diff --git a/packages/core/docs/display/list-group/demo/d02-list-of-links.md b/packages/core/docs/display/list-group/demo/d02-list-of-links.md new file mode 100644 index 000000000..486a7fdc4 --- /dev/null +++ b/packages/core/docs/display/list-group/demo/d02-list-of-links.md @@ -0,0 +1,47 @@ +--- +order: 2 +--- + +# List of links + + +

Display EuiListGroupItems as links by providing an href value and change their state with the isActive and isDisabled properties.

As is done in this example, the EuiListGroup component can also accept an array of items via the listItems property.

+
+ +```hbs template + + + First link + + + This is an active link with very long label that truncates + + + Third link is disabled + + + Fourth link + + + Fifth link + + +``` diff --git a/packages/core/docs/display/list-group/demo/d03-text-wrapping-and-tooltips.md b/packages/core/docs/display/list-group/demo/d03-text-wrapping-and-tooltips.md new file mode 100644 index 000000000..4f414afdd --- /dev/null +++ b/packages/core/docs/display/list-group/demo/d03-text-wrapping-and-tooltips.md @@ -0,0 +1,31 @@ +--- +order: 3 +--- + +# Text wrapping and tooltips + + +

Optional props showToolTip and wrapLines can be used to augment the display of list items. Use these when lists are inside small containers where it is likely that the content will be truncated.

+
+ +```hbs template + + + First item + + + + Second item + + + + + Third very, very long item that + will surely + force truncation + + + Fourth very, very long item with wrapping + enabled that will not force truncation + +``` diff --git a/packages/core/docs/display/list-group/demo/d04-list-item-color-and-size.md b/packages/core/docs/display/list-group/demo/d04-list-item-color-and-size.md new file mode 100644 index 000000000..9010a2da5 --- /dev/null +++ b/packages/core/docs/display/list-group/demo/d04-list-item-color-and-size.md @@ -0,0 +1,27 @@ +--- +order: 4 +--- + +# List item color and size + + +

EuiListGroupItems will inherit the color from their element type whether it is a button, anchor, or span. You can enforce a different color of primary, text, or subdued with the color prop. Or provide the prop directly to EuiListGroup.

They also accept options for text size; 'xs' | 's' | 'm' | 'l'.

+
+ +```hbs template + + + + + + + + + + + + + + + +```