Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1304 from guardian/sa-icon-components-folder
Browse files Browse the repository at this point in the history
get-icons #1 - Move icon components to components folder
  • Loading branch information
SiAdcock authored Mar 15, 2022
2 parents aefd30c + 97a2c3c commit 2dfa40a
Show file tree
Hide file tree
Showing 67 changed files with 170 additions and 170 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { visuallyHidden as _visuallyHidden } from '@guardian/source-foundations'
import { useEffect, useState } from 'react';
import type { HTMLAttributes } from 'react';
import type { Props } from '../@types/Props';
import { SvgChevronDownSingle } from '../icons/SvgChevronDownSingle';
import { SvgChevronDownSingle } from '../icons/components/SvgChevronDownSingle';
import { AccordionRowNoJS } from './AccordionRowNoJS';
import {
accordionRow,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { visuallyHidden as _visuallyHidden } from '@guardian/source-foundations';
import { SvgChevronDownSingle } from '../icons/SvgChevronDownSingle';
import { SvgChevronDownSingle } from '../icons/components/SvgChevronDownSingle';
import type { AccordionRowProps } from './AccordionRow';
import {
accordionRow,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
asChromaticStory,
asPlayground,
} from '../../../../../lib/story-intents';
import { SvgCross } from '../icons/SvgCross';
import { SvgCross } from '../icons/components/SvgCross';
import type { ButtonProps } from './Button';
import { Button } from './Button';
import { buttonThemeBrand, buttonThemeBrandAlt } from './theme';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
asChromaticStory,
asPlayground,
} from '../../../../../lib/story-intents';
import { SvgArrowRightStraight } from '../icons/SvgArrowRightStraight';
import { SvgArrowRightStraight } from '../icons/components/SvgArrowRightStraight';
import { LinkButton } from './LinkButton';
import type { LinkButtonProps } from './LinkButton';
// These types are the right types, but don't work with Storybook v6 which uses Emotion v10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { visuallyHidden } from '@guardian/source-foundations';
import type { ReactElement, ReactNode } from 'react';
import { cloneElement } from 'react';
import { SvgSpinner } from '../icons/SvgSpinner';
import { SvgSpinner } from '../icons/components/SvgSpinner';

export const buttonContents = ({
hideLabel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
asChromaticStory,
asPlayground,
} from '../../../../../lib/story-intents';
import { SvgCamera } from '../icons/SvgCamera';
import { SvgCamera } from '../icons/components/SvgCamera';
import { ChoiceCard } from './ChoiceCard';
import type { ChoiceCardProps } from './ChoiceCard';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SvgChevronUpSingle } from '../icons/SvgChevronUpSingle';
import { SvgChevronUpSingle } from '../icons/components/SvgChevronUpSingle';
import { backToTop, backToTopIcon } from './styles';

export const BackToTop = (
Expand Down
106 changes: 53 additions & 53 deletions packages/@guardian/source-react-components/src/icons/Icons.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,59 @@ import {
} from '../../../../../lib/story-intents';
// These types are the right types, but don't work with Storybook v6 which uses Emotion v10
// import type { Args, Story } from '@storybook/react';
import { SvgAlert } from './SvgAlert';
import { SvgAlertRound } from './SvgAlertRound';
import { SvgAlertTriangle } from './SvgAlertTriangle';
import { SvgAppleBrand } from './SvgAppleBrand';
import { SvgArrowDownStraight } from './SvgArrowDownStraight';
import { SvgArrowLeftStraight } from './SvgArrowLeftStraight';
import { SvgArrowRightStraight } from './SvgArrowRightStraight';
import { SvgArrowUpStraight } from './SvgArrowUpStraight';
import { SvgAudio } from './SvgAudio';
import { SvgCamera } from './SvgCamera';
import { SvgCheckmark } from './SvgCheckmark';
import { SvgChevronDownSingle } from './SvgChevronDownSingle';
import { SvgChevronLeftDouble } from './SvgChevronLeftDouble';
import { SvgChevronLeftSingle } from './SvgChevronLeftSingle';
import { SvgChevronRightDouble } from './SvgChevronRightDouble';
import { SvgChevronRightSingle } from './SvgChevronRightSingle';
import { SvgChevronUpSingle } from './SvgChevronUpSingle';
import { SvgClock } from './SvgClock';
import { SvgCreditCard } from './SvgCreditCard';
import { SvgCross } from './SvgCross';
import { SvgDirectDebit } from './SvgDirectDebit';
import { SvgDirectDebitWide } from './SvgDirectDebitWide';
import { SvgEnvelope } from './SvgEnvelope';
import { SvgExternal } from './SvgExternal';
import { SvgEye } from './SvgEye';
import { SvgEyeStrike } from './SvgEyeStrike';
import { SvgFacebook } from './SvgFacebook';
import { SvgFacebookBrand } from './SvgFacebookBrand';
import { SvgGift } from './SvgGift';
import { SvgGlobe } from './SvgGlobe';
import { SvgGoogleBrand } from './SvgGoogleBrand';
import { SvgHouse } from './SvgHouse';
import { SvgIndent } from './SvgIndent';
import { SvgInfo } from './SvgInfo';
import { SvgLinkedIn } from './SvgLinkedIn';
import { SvgMessenger } from './SvgMessenger';
import { SvgMinus } from './SvgMinus';
import { SvgOfflineCloud } from './SvgOfflineCloud';
import { SvgPayPal } from './SvgPayPal';
import { SvgPerson } from './SvgPerson';
import { SvgPinned } from './SvgPinned';
import { SvgPinterest } from './SvgPinterest';
import { SvgPlay } from './SvgPlay';
import { SvgPlus } from './SvgPlus';
import { SvgQuote } from './SvgQuote';
import { SvgSettings } from './SvgSettings';
import { SvgSpeechBubble } from './SvgSpeechBubble';
import { SvgSpinner } from './SvgSpinner';
import { SvgStar } from './SvgStar';
import { SvgTickRound } from './SvgTickRound';
import { SvgTwitter } from './SvgTwitter';
import { SvgVideo } from './SvgVideo';
import { SvgWhatsApp } from './SvgWhatsApp';
import { SvgAlert } from './components/SvgAlert';
import { SvgAlertRound } from './components/SvgAlertRound';
import { SvgAlertTriangle } from './components/SvgAlertTriangle';
import { SvgAppleBrand } from './components/SvgAppleBrand';
import { SvgArrowDownStraight } from './components/SvgArrowDownStraight';
import { SvgArrowLeftStraight } from './components/SvgArrowLeftStraight';
import { SvgArrowRightStraight } from './components/SvgArrowRightStraight';
import { SvgArrowUpStraight } from './components/SvgArrowUpStraight';
import { SvgAudio } from './components/SvgAudio';
import { SvgCamera } from './components/SvgCamera';
import { SvgCheckmark } from './components/SvgCheckmark';
import { SvgChevronDownSingle } from './components/SvgChevronDownSingle';
import { SvgChevronLeftDouble } from './components/SvgChevronLeftDouble';
import { SvgChevronLeftSingle } from './components/SvgChevronLeftSingle';
import { SvgChevronRightDouble } from './components/SvgChevronRightDouble';
import { SvgChevronRightSingle } from './components/SvgChevronRightSingle';
import { SvgChevronUpSingle } from './components/SvgChevronUpSingle';
import { SvgClock } from './components/SvgClock';
import { SvgCreditCard } from './components/SvgCreditCard';
import { SvgCross } from './components/SvgCross';
import { SvgDirectDebit } from './components/SvgDirectDebit';
import { SvgDirectDebitWide } from './components/SvgDirectDebitWide';
import { SvgEnvelope } from './components/SvgEnvelope';
import { SvgExternal } from './components/SvgExternal';
import { SvgEye } from './components/SvgEye';
import { SvgEyeStrike } from './components/SvgEyeStrike';
import { SvgFacebook } from './components/SvgFacebook';
import { SvgFacebookBrand } from './components/SvgFacebookBrand';
import { SvgGift } from './components/SvgGift';
import { SvgGlobe } from './components/SvgGlobe';
import { SvgGoogleBrand } from './components/SvgGoogleBrand';
import { SvgHouse } from './components/SvgHouse';
import { SvgIndent } from './components/SvgIndent';
import { SvgInfo } from './components/SvgInfo';
import { SvgLinkedIn } from './components/SvgLinkedIn';
import { SvgMessenger } from './components/SvgMessenger';
import { SvgMinus } from './components/SvgMinus';
import { SvgOfflineCloud } from './components/SvgOfflineCloud';
import { SvgPayPal } from './components/SvgPayPal';
import { SvgPerson } from './components/SvgPerson';
import { SvgPinned } from './components/SvgPinned';
import { SvgPinterest } from './components/SvgPinterest';
import { SvgPlay } from './components/SvgPlay';
import { SvgPlus } from './components/SvgPlus';
import { SvgQuote } from './components/SvgQuote';
import { SvgSettings } from './components/SvgSettings';
import { SvgSpeechBubble } from './components/SvgSpeechBubble';
import { SvgSpinner } from './components/SvgSpinner';
import { SvgStar } from './components/SvgStar';
import { SvgTickRound } from './components/SvgTickRound';
import { SvgTwitter } from './components/SvgTwitter';
import { SvgVideo } from './components/SvgVideo';
import { SvgWhatsApp } from './components/SvgWhatsApp';
import type { IconProps, IconSize } from './types';

const uiIcons = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgAlert = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgAlertRound = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgAlertTriangle = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

// The viewBox is changed from "6 6 44 44" to "15 15 26 26" for a ~60% zoom
export const SvgAppleBrand = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgArrowDownStraight = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgArrowLeftStraight = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgArrowRightStraight = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgArrowUpStraight = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgAudio = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgCamera = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgCheckmark = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgChevronDownSingle = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgChevronLeftDouble = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgChevronLeftSingle = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgChevronRightDouble = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgChevronRightSingle = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgChevronUpSingle = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgClock = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgCreditCard = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgCross = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgDirectDebit = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgDirectDebitWide = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgEnvelope = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgExternal = ({
size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import type { EmotionJSX } from '@emotion/react/types/jsx-namespace';
import { iconSize, visuallyHidden } from '@guardian/source-foundations';
import type { IconProps } from './types';
import type { IconProps } from '../types';

export const SvgEye = ({
size,
Expand Down
Loading

0 comments on commit 2dfa40a

Please sign in to comment.