Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to @primer/primtives@8.2.0 and @primer/stylelint-config@13.0.0-rc #2634

Merged
merged 12 commits into from
Jun 3, 2024
Merged
5 changes: 5 additions & 0 deletions .changeset/young-foxes-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Upgrade to @primer/primtives@8.2.0 and @primer/stylelint-config@13.0.0-rc
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ jobs:
- run: npm ci
- run: npm run dist
- name: Lint source files
run: npx stylelint --fix
- name: Look for unused stylelint:disable lines
run: npm run stylelint -- --report-needless-disables
run: npm run stylelint:fix
- name: Push up any fixes
if: ${{ github.event_name == 'pull_request' }}
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
15 changes: 6 additions & 9 deletions docs/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,12 @@ export const decorators = [
const {parameters} = context
const defaultStoryType = 'banner'
const storyType = parameters.storyType || defaultStoryType
document.body.setAttribute('data-color-mode', context.globals.theme.startsWith('light') ? 'light' : 'dark')
document.body.setAttribute(
'data-light-theme',
context.globals.theme.startsWith('light') ? context.globals.theme : undefined,
)
document.body.setAttribute(
'data-dark-theme',
context.globals.theme.startsWith('dark') ? context.globals.theme : undefined,
)
const colorMode = context.globals.theme === '' ? 'light' : (context.globals.theme.startsWith('light') ? 'light' : 'dark')
const lightTheme = context.globals.theme === '' ? 'light' : (colorMode === 'light' ? context.globals.theme : undefined)
const darkTheme = context.globals.theme === '' ? 'dark' : (colorMode === 'dark' ? context.globals.theme : undefined)
document.body.setAttribute('data-color-mode', colorMode)
document.body.setAttribute('data-light-theme', lightTheme)
document.body.setAttribute('data-dark-theme', darkTheme)
return (
<>
{context.globals.theme === 'all' ? (
Expand Down
Loading
Loading