From 629c6391aeb7abe87b1ff4681e529c7affc38b3c Mon Sep 17 00:00:00 2001 From: Noah Overcash Date: Thu, 4 Jan 2024 17:55:53 -0500 Subject: [PATCH 1/2] Improve Loading components documentation (#2199) * Improve Loading components documentation Improves the README of the Loading components by specifically documenting props and example usage. * Add examples * Create README for --------- Co-authored-by: John Coburn --- lib/Loading/readme.md | 39 ++++++++++++++++++++++++++++++++++++--- lib/Spinner/README.md | 11 +++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 lib/Spinner/README.md diff --git a/lib/Loading/readme.md b/lib/Loading/readme.md index d20cd4c1b..753825b6b 100644 --- a/lib/Loading/readme.md +++ b/lib/Loading/readme.md @@ -2,6 +2,39 @@ Components for loading animations for various scenarios within your application. -- `` a basic, standalone loading spinner -- `` a Pane with a loading spinner. For use within existing ``s. Accepts the props of ``. -- `` for fullscreen views. Accepts the props of `` and includes a wrapping ``. \ No newline at end of file +## ``: a basic, standalone loading spinner + +| Property | Type | Description | Default | Required | +| --- | --- | --- | --- | --- | +| size | `small`, `medium`, `large`, or `xlarge` | The size of the loading icon | `medium` | | +| useCurrentColor | boolean | If the current element's CSS text `color` should be used instead of the default grey | `false` | | + +### Example + +```jsx + +``` + +## ``: a Pane with a loading spinner + +For use within existing ``s. Accepts the props of ``. + +Accepts all properties of [](https://github.com/folio-org/stripes-components/blob/master/lib/Pane/readme.md#props), however, +`defaultWidth` is optional (set to `fill` by default). Any provided `children` will be ignored. + +### Example + +```jsx + +``` + +## ``: for fullscreen views + +Accepts the same props as ``, with the addition of `panesetProps`. `panesetProps` will be passed to the underlying +`` and all other props will be passed to the underlying ``. + +### Example + +```jsx + +``` diff --git a/lib/Spinner/README.md b/lib/Spinner/README.md new file mode 100644 index 000000000..1b7eeeedc --- /dev/null +++ b/lib/Spinner/README.md @@ -0,0 +1,11 @@ +# Spinner + +Renders a loading spinner icon. + +## Props +None + +## Usage +```jsx + +``` From 99cfe5b070eb1e439d4cc06b5a2249ee5f7e2020 Mon Sep 17 00:00:00 2001 From: Noah Overcash Date: Thu, 4 Jan 2024 18:08:02 -0500 Subject: [PATCH 2/2] Add missing InfoPopover props (#2198) Co-authored-by: John Coburn --- lib/InfoPopover/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/InfoPopover/readme.md b/lib/InfoPopover/readme.md index f70a854c2..f78dde1a0 100644 --- a/lib/InfoPopover/readme.md +++ b/lib/InfoPopover/readme.md @@ -25,5 +25,7 @@ contentClass | string | `className` for content inside popover | iconSize | string | The size of the icon (`small` or `medium`) | small hideOnButtonClick | boolean | Whether to hide popover on anchor button click | false renderTrigger | func | Render a custom trigger button. The function will receive an object that contains the the `open`-state, a `ref` that needs to be passed onto trigger button and a `toggle`-function for toggling the ``. The render function should return a button. | +buttonProps | object | Pass additional props to the trigger `` | `{}` +popperProps | object | Pass additional props to the underlying `` | `{}` The remaining props passed to `` will be passed down to the internal ``.