diff --git a/.changeset/fifty-emus-smash.md b/.changeset/fifty-emus-smash.md new file mode 100644 index 000000000..1b6187736 --- /dev/null +++ b/.changeset/fifty-emus-smash.md @@ -0,0 +1,5 @@ +--- +'@guardian/source-development-kitchen': major +--- + +Remove `EditorialButton` and `EditorialLinkButton` components diff --git a/libs/@guardian/source-development-kitchen/src/react-components/editorial-button/EditorialButton.stories.tsx b/libs/@guardian/source-development-kitchen/src/react-components/editorial-button/EditorialButton.stories.tsx deleted file mode 100644 index 797f1b58f..000000000 --- a/libs/@guardian/source-development-kitchen/src/react-components/editorial-button/EditorialButton.stories.tsx +++ /dev/null @@ -1,163 +0,0 @@ -import { css } from '@emotion/react'; -import { - ArticleDesign, - ArticleDisplay, - ArticlePillar, - ArticleSpecial, -} from '@guardian/libs'; -import { SvgCross } from '@guardian/source/react-components'; -import type { Meta, StoryFn } from '@storybook/react'; -import { EditorialButton } from './EditorialButton'; -import type { EditorialButtonProps } from './EditorialButton'; - -const defaultFormat = { - display: ArticleDisplay.Standard, - design: ArticleDesign.Standard, -}; - -const meta: Meta = { - title: 'React Components/EditorialButton', - component: EditorialButton, - argTypes: { - format: { - options: [ - 'news', - 'sport', - 'culture', - 'lifestyle', - 'opinion', - 'special_report', - 'labs', - ], - mapping: { - news: { ...defaultFormat, theme: ArticlePillar.News }, - sport: { ...defaultFormat, theme: ArticlePillar.Sport }, - culture: { ...defaultFormat, theme: ArticlePillar.Culture }, - lifestyle: { ...defaultFormat, theme: ArticlePillar.Lifestyle }, - opinion: { ...defaultFormat, theme: ArticlePillar.Opinion }, - special_report: { - ...defaultFormat, - theme: ArticleSpecial.SpecialReport, - }, - labs: { ...defaultFormat, theme: ArticleSpecial.Labs }, - }, - control: { type: 'radio' }, - }, - icon: { - options: ['undefined', 'cross'], - mapping: { - undefined: undefined, - cross: , - }, - control: { type: 'radio' }, - }, - }, - args: { - size: 'default', - hideLabel: false, - icon: undefined, - priority: 'primary', - iconSide: 'left', - nudgeIcon: false, - }, -}; - -export default meta; - -const Template: StoryFn = ( - args: EditorialButtonProps, -) => { - // Providing any value for cssOverrides, even undefined, overrides the custom styles - // for the editorial button so only pass through if it's defined - const { cssOverrides, ...rest } = args; - const props = rest as EditorialButtonProps; - - if (cssOverrides) { - props.cssOverrides = cssOverrides; - } - - return Click me; -}; - -const pillars = [ - ArticlePillar.News, - ArticlePillar.Sport, - ArticlePillar.Culture, - ArticlePillar.Lifestyle, - ArticlePillar.Opinion, - ArticleSpecial.SpecialReport, - ArticleSpecial.Labs, -]; - -const RowTemplate: StoryFn = ( - args: Partial, -) => ( -
- {pillars.map((pillar) => ( -