From f38d41c743ffc1237db513a7fe1522decd230476 Mon Sep 17 00:00:00 2001 From: Jeffrey Cherewaty Date: Mon, 3 Sep 2018 18:48:02 -0500 Subject: [PATCH] Update import examples in docs --- MIGRATIONPATHS.md | 8 ++--- docs/UIModuleLayout.md | 4 +-- lib/Accordion/readme.md | 4 +-- lib/AppIcon/readme.md | 4 +-- lib/AutoSuggest/readme.md | 2 +- lib/Button/readme.md | 2 +- lib/DateRangeWrapper/readme.md | 22 ++++++------- lib/Datepicker/readme.md | 2 +- lib/Dropdown/readme.md | 9 +++--- lib/EmptyMessage/readme.md | 2 +- lib/Headline/readme.md | 2 +- lib/HotKeys/readme.md | 6 ++-- lib/Icon/readme.md | 6 ++-- lib/IconButton/readme.md | 2 +- lib/InfoPopover/readme.md | 2 +- lib/KeyValue/readme.md | 2 +- lib/Layer/readme.md | 18 +++++------ lib/Layout/readme.md | 6 ++-- lib/LayoutGrid/readme.md | 2 +- lib/List/readme.md | 2 +- lib/MenuItem/readme.md | 3 +- lib/Modal/readme.md | 3 +- lib/ModalFooter/readme.md | 3 +- lib/MultiSelection/readme.md | 56 +++++++++++++++++----------------- lib/NavList/readme.md | 4 +-- lib/Pane/readme.md | 3 +- lib/Paneset/readme.md | 3 +- lib/Popover/readme.md | 2 +- lib/RadioButton/readme.md | 2 +- lib/ReduxFormField/readme.md | 2 -- lib/SRStatus/readme.md | 2 +- lib/SearchField/readme.md | 4 +-- lib/SegmentedControl/readme.md | 2 +- lib/Select/readme.md | 2 +- lib/Selection/readme.md | 5 ++- lib/Timepicker/readme.md | 2 +- 36 files changed, 96 insertions(+), 109 deletions(-) diff --git a/MIGRATIONPATHS.md b/MIGRATIONPATHS.md index 763db13e5..06e262097 100644 --- a/MIGRATIONPATHS.md +++ b/MIGRATIONPATHS.md @@ -1,12 +1,12 @@ # Stripes-Components Migration Paths ## 3.x to 4.x -Upcoming release. +Upcoming release. ### Some Components and utilities have moved We've provided console warnings for these items. If you've used these in your module with a `stripes-components` path, you'll simply have to update your import path: Component/Util | New path -- | -- -``, ``, ``, `` | `import { ... } from '@folio/stripes-smart-components'` -`` | `@folio/stripes-core/lib/Pluggable` -`makeQueryFunction()` | `import { makeQueryFunction } from '@folio/stripes-smart-components'` +``, ``, ``, `` | `import { ... } from '@folio/stripes/smart-components'` +`` | `@folio/stripes/core` +`makeQueryFunction()` | `import { makeQueryFunction } from '@folio/stripes/smart-components'` diff --git a/docs/UIModuleLayout.md b/docs/UIModuleLayout.md index 85f77387a..5330e0787 100644 --- a/docs/UIModuleLayout.md +++ b/docs/UIModuleLayout.md @@ -18,9 +18,7 @@ A `` is a container that spans the width of its parent element. It nests on ``` import React from 'react'; -import Paneset from '@folio/stripes-components/lib/Paneset'; -import Pane from '@folio/stripes-components/lib/Pane'; -import { Row, Col } from '@folio/stripes-components/lib/LayoutGrid'; +import { Col, Pane, Paneset, Row } from '@folio/stripes/components'; class LayoutExample extends React.Component { render() { diff --git a/lib/Accordion/readme.md b/lib/Accordion/readme.md index f4d5e60a2..740c35f57 100644 --- a/lib/Accordion/readme.md +++ b/lib/Accordion/readme.md @@ -5,7 +5,7 @@ Make parts of the UI collapsible using this component. ## Basic Usage ``` -import { AccordionSet, Accordion } from '@folio/stripes-components/lib/Accordion'; +import { AccordionSet, Accordion } from '@folio/stripes/components'; ... @@ -42,7 +42,7 @@ Keyboard support comes packaged with use of the ``. The keys are a Accordions can, of course, be controlled by state or local resource. Simply include an object with a list of keys for each accordion's `id` set to a boolean value that will be passed through to the corresponding accordion's `open` prop. This object should be passed to the ``'s `accordionStatus` prop. An `onToggle` handler will also need to be provided for proper state interaction. Passed to the ``'s `onToggle` prop, it will receive both the label and id of the target accordion, either of which could be used for additional interactions as needed. ``` -import { AccordionSet, Accordion } from '@folio/stripes-components/lib/Accordion'; +import { AccordionSet, Accordion } from '@folio/stripes/components'; ... // state or manifest/local resource. diff --git a/lib/AppIcon/readme.md b/lib/AppIcon/readme.md index e9f3a1494..42946a490 100644 --- a/lib/AppIcon/readme.md +++ b/lib/AppIcon/readme.md @@ -7,7 +7,7 @@ AppIcon supports different ways of loading icons. ***1. Use context (recommended)*** ```js - import AppIcon from '@folio/stripes-components/lib/AppIcon'; + import { AppIcon } from '@folio/stripes/components'; // Note: Make sure that the AppIcon has "stripes" in context as it relies on stripes.metadata. @@ -29,7 +29,7 @@ AppIcon supports different ways of loading icons. ***3. Pass src and alt as props*** ```js - diff --git a/lib/AutoSuggest/readme.md b/lib/AutoSuggest/readme.md index e91d581f8..f3afb4e65 100644 --- a/lib/AutoSuggest/readme.md +++ b/lib/AutoSuggest/readme.md @@ -3,7 +3,7 @@ Displays a dropdown with a list of suggestions based on the entered string in th ## Usage ``` -import AutoSuggest from '../../lib/AutoSuggest'; +import { AutoSuggest } from '@folio/stripes/components'; // later in your JSX.... diff --git a/lib/Button/readme.md b/lib/Button/readme.md index 2b19c5043..0c4574d2e 100644 --- a/lib/Button/readme.md +++ b/lib/Button/readme.md @@ -5,7 +5,7 @@ The classic button, in different styles and sizes ## Basic Usage ``` -import { Button } from '@folio/stripes-components/lib/Button'; +import { Button } from '@folio/stripes/components'; ...