@codecademy/styleguide 79.1.3 → 79.1.4-alpha.41ac42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/components/Elements/ImageGallery.tsx +1 -1
- package/CHANGELOG.md +4 -0
- package/package.json +2 -2
- package/src/lib/Atoms/Animations/ExpandInCollapseOut/ExpandInCollapseOut.stories.tsx +1 -1
- package/src/lib/Atoms/Animations/FadeInSlideOut/FadeInSlideOut.stories.tsx +1 -1
- package/src/lib/Meta/ESLint rules.mdx +1 -1
- package/src/lib/Meta/Installation.mdx +30 -7
|
@@ -3,7 +3,7 @@ import { GamutIconProps } from '@codecademy/gamut-icons';
|
|
|
3
3
|
import { IllustrationProps } from '@codecademy/gamut-illustrations';
|
|
4
4
|
import { PatternProps } from '@codecademy/gamut-patterns';
|
|
5
5
|
import { css, timingValues } from '@codecademy/gamut-styles';
|
|
6
|
-
import { motion, AnimatePresence } from '
|
|
6
|
+
import { motion, AnimatePresence } from 'motion/react';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { useState } from 'react';
|
|
9
9
|
import styled from '@emotion/styled';
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [79.1.4-alpha.41ac42.0](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.1.3...@codecademy/styleguide@79.1.4-alpha.41ac42.0) (2026-03-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @codecademy/styleguide
|
|
9
|
+
|
|
6
10
|
### [79.1.3](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.1.2...@codecademy/styleguide@79.1.3) (2026-03-02)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/styleguide",
|
|
3
3
|
"description": "Styleguide & Component library for codecademy.com",
|
|
4
|
-
"version": "79.1.
|
|
4
|
+
"version": "79.1.4-alpha.41ac42.0",
|
|
5
5
|
"author": "Codecademy Engineering",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"repository": "git@github.com:Codecademy/gamut.git",
|
|
11
|
-
"gitHead": "
|
|
11
|
+
"gitHead": "d93ddb0217c152eb946b407ab98d25921927cbc1"
|
|
12
12
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
FlexBox,
|
|
6
6
|
} from '@codecademy/gamut';
|
|
7
7
|
import type { Meta } from '@storybook/react';
|
|
8
|
-
import { AnimatePresence } from '
|
|
8
|
+
import { AnimatePresence } from 'motion/react';
|
|
9
9
|
import { PropsWithChildren, useState } from 'react';
|
|
10
10
|
|
|
11
11
|
const meta: Meta<typeof ExpandInCollapseOut> = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Box, FadeInSlideOut, FillButton, FlexBox } from '@codecademy/gamut';
|
|
2
2
|
import type { Meta } from '@storybook/react';
|
|
3
|
-
import { AnimatePresence } from '
|
|
3
|
+
import { AnimatePresence } from 'motion/react';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof FadeInSlideOut> = {
|
|
@@ -79,7 +79,7 @@ const ExpandableContainer = styled.Box(
|
|
|
79
79
|
|
|
80
80
|
#### Disabling the rule
|
|
81
81
|
|
|
82
|
-
For third-party components or edge cases where inline styles are necessary (e.g.,
|
|
82
|
+
For third-party components or edge cases where inline styles are necessary (e.g., motion animations), you can disable the rule:
|
|
83
83
|
|
|
84
84
|
```tsx
|
|
85
85
|
// eslint-disable-next-line gamut/no-inline-style
|
|
@@ -39,21 +39,44 @@ yarn add @codecademy/gamut-kit @emotion/react @emotion/styled
|
|
|
39
39
|
|
|
40
40
|
3. Wrap your application root with `GamutProvider` and give it the theme you would like to use for your app.
|
|
41
41
|
|
|
42
|
+
**React 19:**
|
|
43
|
+
|
|
42
44
|
```tsx
|
|
43
45
|
import React from 'react';
|
|
44
|
-
import {
|
|
46
|
+
import { createRoot } from 'react-dom/client';
|
|
45
47
|
import { GamutProvider, theme } from '@codecademy/gamut-styles';
|
|
46
48
|
|
|
47
49
|
import { App } from './App';
|
|
48
50
|
|
|
49
51
|
const rootElement = document.getElementById('root');
|
|
52
|
+
if (rootElement) {
|
|
53
|
+
const root = createRoot(rootElement);
|
|
54
|
+
root.render(
|
|
55
|
+
<GamutProvider>
|
|
56
|
+
<App />
|
|
57
|
+
</GamutProvider>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
```
|
|
50
61
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
**React 18:**
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import React from 'react';
|
|
66
|
+
import { render } from 'react-dom';
|
|
67
|
+
import { GamutProvider, theme } from '@codecademy/gamut-styles';
|
|
68
|
+
|
|
69
|
+
import { App } from './App';
|
|
70
|
+
|
|
71
|
+
const rootElement = document.getElementById('root');
|
|
72
|
+
if (rootElement) {
|
|
73
|
+
render(
|
|
74
|
+
<GamutProvider>
|
|
75
|
+
<App />
|
|
76
|
+
</GamutProvider>,
|
|
77
|
+
rootElement
|
|
78
|
+
);
|
|
79
|
+
}
|
|
57
80
|
```
|
|
58
81
|
|
|
59
82
|
GamutProvider handles a few critical tasks that need to happen in order for components to work.
|