@codecademy/brand 3.42.1 → 3.42.2-alpha.5347b4bf04.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/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/package.json +1 -1
- package/dist/EditorialImage/index.d.ts +0 -10
- package/dist/EditorialImage/index.js +0 -22
- package/dist/EditorialImage/styles.module.scss +0 -36
- package/dist/assets/dots.svg +0 -1
- package/dist/stories/Molecules/EditorialImage.stories.js +0 -17
package/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,6 @@ export * from './CurriculumCard/Difficulty';
|
|
|
33
33
|
export * from './CurriculumCard/Difficulty/types';
|
|
34
34
|
export * from './CurriculumCard/Difficulty/helpers';
|
|
35
35
|
export * from './DropdownButton';
|
|
36
|
-
export * from './EditorialImage';
|
|
37
36
|
export * from './EmptySection';
|
|
38
37
|
export * from './NotFoundContent';
|
|
39
38
|
export * from './ErrorContents';
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,6 @@ export * from './CurriculumCard/Difficulty';
|
|
|
33
33
|
export * from './CurriculumCard/Difficulty/types';
|
|
34
34
|
export * from './CurriculumCard/Difficulty/helpers';
|
|
35
35
|
export * from './DropdownButton';
|
|
36
|
-
export * from './EditorialImage';
|
|
37
36
|
export * from './EmptySection';
|
|
38
37
|
export * from './NotFoundContent';
|
|
39
38
|
export * from './ErrorContents';
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type EditorialImageProps = {
|
|
3
|
-
/** The URL used for the image src */
|
|
4
|
-
image: string;
|
|
5
|
-
/** Alternative text for the image */
|
|
6
|
-
alt: string;
|
|
7
|
-
/** An optional caption that will display below the image */
|
|
8
|
-
caption?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const EditorialImage: React.FC<EditorialImageProps>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line gamut/no-css-standalone
|
|
4
|
-
import styles from './styles.module.scss';
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export const EditorialImage = ({
|
|
7
|
-
image,
|
|
8
|
-
alt,
|
|
9
|
-
caption
|
|
10
|
-
}) => /*#__PURE__*/_jsxs("div", {
|
|
11
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
12
|
-
className: styles.imageContainer,
|
|
13
|
-
children: /*#__PURE__*/_jsx("img", {
|
|
14
|
-
className: styles.image,
|
|
15
|
-
alt: alt,
|
|
16
|
-
src: image
|
|
17
|
-
})
|
|
18
|
-
}), caption && /*#__PURE__*/_jsx("span", {
|
|
19
|
-
className: styles.caption,
|
|
20
|
-
children: caption
|
|
21
|
-
})]
|
|
22
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
@use "~@codecademy/gamut-styles/utils";
|
|
2
|
-
|
|
3
|
-
.imageContainer {
|
|
4
|
-
position: relative;
|
|
5
|
-
width: calc(100% - 1rem);
|
|
6
|
-
@include utils.screen-size-gte(utils.$grid-xs-min) {
|
|
7
|
-
width: inherit;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.image {
|
|
12
|
-
width: 100%;
|
|
13
|
-
position: relative;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.imageContainer::before {
|
|
17
|
-
content: "";
|
|
18
|
-
position: absolute;
|
|
19
|
-
left: 1rem;
|
|
20
|
-
top: 2rem;
|
|
21
|
-
background-image: url("../assets/dots.svg");
|
|
22
|
-
background-repeat: repeat;
|
|
23
|
-
height: calc(100% - 1rem);
|
|
24
|
-
width: 100%;
|
|
25
|
-
z-index: 0;
|
|
26
|
-
filter: invert(19%) sepia(50%) saturate(3200%) hue-rotate(-24deg)
|
|
27
|
-
brightness(95%) contrast(97%);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.caption {
|
|
31
|
-
color: utils.$color-white;
|
|
32
|
-
opacity: 0.7;
|
|
33
|
-
font-weight: bold;
|
|
34
|
-
margin: 1rem 1rem 0;
|
|
35
|
-
display: block;
|
|
36
|
-
}
|
package/dist/assets/dots.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="6" height="6" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><path d="M1 1h1v1H1zm0 1h1v1H1zm1-1h1v1H2zM1 0h1v1H1zM0 1h1v1H0zM4 4h1v1H4zm0 1h1v1H4zm1-1h1v1H5zM4 3h1v1H4zM3 4h1v1H3z"/></g></svg>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { EditorialImage } from '../../index';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
const meta = {
|
|
4
|
-
component: EditorialImage,
|
|
5
|
-
args: {
|
|
6
|
-
image: 'https://images.ctfassets.net/go6kr6r0ykrq/4NI4czS6Y3DeaBBlVAoPTL/5a95deb01518e0cbb27bac8c6e00eaf6/broadway_2_70.jpg',
|
|
7
|
-
alt: 'A picture of two Codecademy employees.',
|
|
8
|
-
caption: 'You can remove this caption.'
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
export const Default = {
|
|
13
|
-
render: args => /*#__PURE__*/_jsx(EditorialImage, {
|
|
14
|
-
...args
|
|
15
|
-
}),
|
|
16
|
-
name: 'EditorialImage'
|
|
17
|
-
};
|