Skip to content

Commit 273438e

Browse files
committed
Remove StyledOcticon
1 parent 2a520cc commit 273438e

File tree

12 files changed

+46
-132
lines changed

12 files changed

+46
-132
lines changed

e2e/components/StyledOcticon.test.ts renamed to e2e/components/Octicon.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ import {test, expect} from '@playwright/test'
22
import {visit} from '../test-helpers/storybook'
33
import {themes} from '../test-helpers/themes'
44

5-
test.describe('StyledOcticon', () => {
5+
test.describe('Octicon', () => {
66
test.describe('Default', () => {
77
for (const theme of themes) {
88
test.describe(theme, () => {
99
test('default @vrt', async ({page}) => {
1010
await visit(page, {
11-
id: 'components-styledocticon--default',
11+
id: 'components-octicon--default',
1212
globals: {
1313
colorScheme: theme,
1414
},
1515
})
1616

1717
// Default state
18-
expect(await page.screenshot()).toMatchSnapshot(`StyledOcticon.Default.${theme}.png`)
18+
expect(await page.screenshot()).toMatchSnapshot(`Octicon.Default.${theme}.png`)
1919
})
2020

2121
test('axe @aat', async ({page}) => {
2222
await visit(page, {
23-
id: 'components-styledocticon--default',
23+
id: 'components-octicon--default',
2424
globals: {
2525
colorScheme: theme,
2626
},
@@ -36,19 +36,19 @@ test.describe('StyledOcticon', () => {
3636
test.describe(theme, () => {
3737
test('default @vrt', async ({page}) => {
3838
await visit(page, {
39-
id: 'components-styledocticon--playground',
39+
id: 'components-octicon--playground',
4040
globals: {
4141
colorScheme: theme,
4242
},
4343
})
4444

4545
// Default state
46-
expect(await page.screenshot()).toMatchSnapshot(`StyledOcticon.Playground.${theme}.png`)
46+
expect(await page.screenshot()).toMatchSnapshot(`Octicon.Playground.${theme}.png`)
4747
})
4848

4949
test('axe @aat', async ({page}) => {
5050
await visit(page, {
51-
id: 'components-styledocticon--playground',
51+
id: 'components-octicon--playground',
5252
globals: {
5353
colorScheme: theme,
5454
},

examples/nextjs/package-lock.json

Lines changed: 29 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

script/generate-e2e-tests.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,15 +1114,15 @@ const components = new Map([
11141114
},
11151115
],
11161116
[
1117-
'StyledOcticon',
1117+
'Octicon',
11181118
{
11191119
stories: [
11201120
{
1121-
id: 'components-styledocticon--default',
1121+
id: 'components-octicon--default',
11221122
name: 'Default',
11231123
},
11241124
{
1125-
id: 'components-styledocticon--playground',
1125+
id: 'components-octicon--playground',
11261126
name: 'Playground',
11271127
},
11281128
],

src/StyledOcticon/StyledOcticon.stories.tsx renamed to src/Octicon/Octicon.stories.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from 'react'
22
import {Meta, ComponentStory} from '@storybook/react'
3-
import StyledOcticon from './StyledOcticon'
3+
import Octicon from './Octicon'
44
import {HeartFillIcon} from '@primer/octicons-react'
55

66
export default {
7-
title: 'Components/StyledOcticon',
8-
component: StyledOcticon,
9-
} as Meta<typeof StyledOcticon>
7+
title: 'Components/Octicon',
8+
component: Octicon,
9+
} as Meta<typeof Octicon>
1010

11-
export const Default = () => <StyledOcticon icon={HeartFillIcon} size={32} />
11+
export const Default = () => <Octicon icon={HeartFillIcon} size={32} />
1212

13-
export const Playground: ComponentStory<typeof StyledOcticon> = args => <StyledOcticon icon={HeartFillIcon} {...args} />
13+
export const Playground: ComponentStory<typeof Octicon> = args => <Octicon icon={HeartFillIcon} {...args} />
1414

1515
Playground.args = {
1616
ariaLabel: 'Heart',

src/StyledOcticon/StyledOcticon.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/StyledOcticon/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/__tests__/StyledOcticon.test.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/__tests__/StyledOcticon.types.test.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/__tests__/__snapshots__/StyledOcticon.test.tsx.snap

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/__tests__/__snapshots__/exports.test.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ exports[`@primer/react should not update exports without a semver change 1`] = `
5757
"Spinner",
5858
"SplitPageLayout",
5959
"StateLabel",
60-
"StyledOcticon",
6160
"SubNav",
6261
"TabNav",
6362
"Text",

0 commit comments

Comments
 (0)