From 1d1b751f6272824e1214b7d22fe1319006a4849d Mon Sep 17 00:00:00 2001 From: Nidhi Kumari Date: Thu, 26 Jan 2023 01:24:08 +0530 Subject: [PATCH] Consolidated all component import paths (#17368) --- .../component-library/button-base/README.mdx | 14 ++++++------- .../button-primary/README.mdx | 4 ++-- .../button-secondary/README.mdx | 5 ++--- .../component-library/text/README.mdx | 20 +++++++++---------- .../settings/info-tab/info-tab.component.js | 2 +- 5 files changed, 22 insertions(+), 23 deletions(-) diff --git a/ui/components/component-library/button-base/README.mdx b/ui/components/component-library/button-base/README.mdx index 7d82e54315fd..2cc551e536a7 100644 --- a/ui/components/component-library/button-base/README.mdx +++ b/ui/components/component-library/button-base/README.mdx @@ -37,7 +37,7 @@ Possible sizes include: ```jsx import { SIZES } from '../../../helpers/constants/design-system'; -import { ButtonBase } from '../../ui/components/component-library'; +import { ButtonBase } from '../../component-library'; @@ -55,7 +55,7 @@ Use boolean `block` prop to quickly enable a full width block button ```jsx import { DISPLAY } from '../../../helpers/constants/design-system'; -import { ButtonBase } from '../../ui/components/component-library'; +import { ButtonBase } from '../../component-library'; Default Button Block Button @@ -77,7 +77,7 @@ Button `as` options: ```jsx -import { ButtonBase } from '../../ui/components/component-library'; +import { ButtonBase } from '../../component-library'; Button Element @@ -95,7 +95,7 @@ When an `href` prop is passed it will change the element to an anchor(`a`) tag. ```jsx -import { ButtonBase } from '../../ui/components/component-library'; +import { ButtonBase } from '../../component-library'; Anchor Element; ``` @@ -109,7 +109,7 @@ Use the boolean `disabled` prop to disable button ```jsx -import { ButtonBase } from '../../ui/components/component-library'; +import { ButtonBase } from '../../component-library'; Disabled Button; ``` @@ -123,7 +123,7 @@ Use the boolean `loading` prop to set loading spinner ```jsx -import { ButtonBase } from '../../ui/components/component-library'; +import { ButtonBase } from '../../component-library'; Loading Button; ``` @@ -137,7 +137,7 @@ Use the `iconName` prop and the `ICON_NAMES` object from `./ui/components/compon ```jsx -import { ButtonBase } from '../../ui/components/component-library'; +import { ButtonBase } from '../../component-library'; import { ICON_NAMES } from '../icon'; Button; diff --git a/ui/components/component-library/button-primary/README.mdx b/ui/components/component-library/button-primary/README.mdx index 846ae1ffddf6..c8ecbc424110 100644 --- a/ui/components/component-library/button-primary/README.mdx +++ b/ui/components/component-library/button-primary/README.mdx @@ -34,7 +34,7 @@ Possible sizes include: ```jsx import { SIZES } from '../../../helpers/constants/design-system'; -import { ButtonPrimary } from '../../ui/components/component-library'; +import { ButtonPrimary } from '../../component-library'; @@ -50,7 +50,7 @@ Use the `danger` boolean prop to change the `ButtonPrimary` to danger color. ```jsx -import { ButtonPrimary } from '../../ui/components/component-library'; +import { ButtonPrimary } from '../../component-library'; Normal Danger diff --git a/ui/components/component-library/button-secondary/README.mdx b/ui/components/component-library/button-secondary/README.mdx index 75b6d9896957..a5b2b3c7de26 100644 --- a/ui/components/component-library/button-secondary/README.mdx +++ b/ui/components/component-library/button-secondary/README.mdx @@ -34,7 +34,7 @@ Possible sizes include: ```jsx import { SIZES } from '../../../helpers/constants/design-system'; -import { ButtonSecondary } from '../../ui/components/component-library'; +import { ButtonSecondary } from '../../component-library'; @@ -50,8 +50,7 @@ Use the `danger` boolean prop to change the `ButtonSecondary` to danger color. ```jsx -import { ButtonSecondary } from '../../ui/components/component-library'; - +import { ButtonSecondary } from '../../component-library'; Normal Danger ``` diff --git a/ui/components/component-library/text/README.mdx b/ui/components/component-library/text/README.mdx index b45e7f6dfceb..4f80f283fd9f 100644 --- a/ui/components/component-library/text/README.mdx +++ b/ui/components/component-library/text/README.mdx @@ -29,7 +29,7 @@ Optional: `TEXT_VARIANTS` from ./text object can also be used. ```jsx -import { Text } from '../../ui/components/component-library'; +import { Text } from '../../component-library'; import { TEXT } from '../../../helpers/constants/design-system'; display-md @@ -54,7 +54,7 @@ Use the `color` prop and the `COLORS` object from `./ui/helpers/constants/design ```jsx -import { Text } from '../../ui/components/component-library'; +import { Text } from '../../component-library'; import { COLORS } from '../../../helpers/constants/design-system'; @@ -111,7 +111,7 @@ Use the `fontWeight` prop and the `FONT_WEIGHT` object from `./ui/helpers/consta ```jsx -import { Text } from '../../ui/components/component-library'; +import { Text } from '../../component-library'; import { FONT_WEIGHT } from '../../../helpers/constants/design-system'; @@ -137,7 +137,7 @@ Use the `fontStyle` prop and the `FONT_STYLE` object from `./ui/helpers/constant ```jsx -import { Text } from '../../ui/components/component-library'; +import { Text } from '../../component-library'; import { FONT_STYLE } from '../../../helpers/constants/design-system'; @@ -157,7 +157,7 @@ Use the `textTransform` prop and the `TEXT_TRANSFORM` object from `./ui/helpers/ ```jsx -import { Text } from '../../ui/components/component-library'; +import { Text } from '../../component-library'; import { TEXT_TRANSFORM } from '../../../helpers/constants/design-system'; @@ -180,7 +180,7 @@ Use the `textAlign` prop and the `TEXT_ALIGN` object from `./ui/helpers/constant ```jsx -import { Text } from '../../ui/components/component-library'; +import { Text } from '../../component-library'; import { TEXT_ALIGN } from '../../../helpers/constants/design-system'; @@ -209,7 +209,7 @@ Use the `overflowWrap` prop and the `OVERFLOW_WRAP` object from `./ui/helpers/co ```jsx -import { Text } from '../../ui/components/component-library'; +import { Text } from '../../component-library'; import { OVERFLOW_WRAP } from '../../../helpers/constants/design-system';
```jsx -import { Text } from '../../ui/components/component-library'; +import { Text } from '../../component-library';
```jsx -import { Text } from '../../ui/components/component-library'; +import { Text } from '../../component-library'; dd div @@ -308,7 +308,7 @@ Use the `textDirection` prop and the `TEXT_DIRECTIONS` object from `./text.const ```jsx -import { Text, TEXT_DIRECTIONS } from '../../ui/components/component-library'; +import { Text, TEXT_DIRECTIONS } from '../../component-library'; This is left to right (ltr) for English and most languages diff --git a/ui/pages/settings/info-tab/info-tab.component.js b/ui/pages/settings/info-tab/info-tab.component.js index 5435576d541b..5c6e4b66ecc4 100644 --- a/ui/pages/settings/info-tab/info-tab.component.js +++ b/ui/pages/settings/info-tab/info-tab.component.js @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Button from '../../../components/ui/button'; -import { Tag } from '../../../components/component-library/tag'; +import { Tag } from '../../../components/component-library'; import { SUPPORT_REQUEST_LINK } from '../../../helpers/constants/common'; import { isBeta } from '../../../helpers/utils/build-types';