Skip to content

Commit af3ab76

Browse files
authored
Upgrade to @primer/[email protected] and @primer/[email protected] (#2634)
* Upgrade primer/primitives to latest * Change theme imports * Remove empty css imports * upgrade * Replacing $spacing variables * Replace a few direct values * Fix stylelint add disables script * Add stylelint disables to exisiting files * Fix ci run * Create young-foxes-battle.md * Updates from suggestions * Fix theme in storybook
1 parent baf0cdc commit af3ab76

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1285
-663
lines changed

.changeset/young-foxes-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/css": patch
3+
---
4+
5+
Upgrade to @primer/primtives@8.2.0 and @primer/stylelint-config@13.0.0-rc

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ jobs:
1616
- run: npm ci
1717
- run: npm run dist
1818
- name: Lint source files
19-
run: npx stylelint --fix
20-
- name: Look for unused stylelint:disable lines
21-
run: npm run stylelint -- --report-needless-disables
19+
run: npm run stylelint:fix
2220
- name: Push up any fixes
2321
if: ${{ github.event_name == 'pull_request' }}
2422
uses: stefanzweifel/git-auto-commit-action@v5

docs/.storybook/preview.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,12 @@ export const decorators = [
7070
const {parameters} = context
7171
const defaultStoryType = 'banner'
7272
const storyType = parameters.storyType || defaultStoryType
73-
document.body.setAttribute('data-color-mode', context.globals.theme.startsWith('light') ? 'light' : 'dark')
74-
document.body.setAttribute(
75-
'data-light-theme',
76-
context.globals.theme.startsWith('light') ? context.globals.theme : undefined,
77-
)
78-
document.body.setAttribute(
79-
'data-dark-theme',
80-
context.globals.theme.startsWith('dark') ? context.globals.theme : undefined,
81-
)
73+
const colorMode = context.globals.theme === '' ? 'light' : (context.globals.theme.startsWith('light') ? 'light' : 'dark')
74+
const lightTheme = context.globals.theme === '' ? 'light' : (colorMode === 'light' ? context.globals.theme : undefined)
75+
const darkTheme = context.globals.theme === '' ? 'dark' : (colorMode === 'dark' ? context.globals.theme : undefined)
76+
document.body.setAttribute('data-color-mode', colorMode)
77+
document.body.setAttribute('data-light-theme', lightTheme)
78+
document.body.setAttribute('data-dark-theme', darkTheme)
8279
return (
8380
<>
8481
{context.globals.theme === 'all' ? (

0 commit comments

Comments
 (0)