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

image preview remove #298

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions doc/introduction/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ All config values are defined in [`provider.tsx`](https://github.com/EscolaLMS/C
```js
import ThemeTester from "../../src/styleguide/ThemeTester";
import ColorBox from "../../src/styleguide/ColorBox/ColorBox";
import ImageModal from "../../src/styleguide/ImageModal";
import img1 from "../../src/styleguide/ColorBox/ColorBox.png";
<React.Fragment>
<ThemeTester>
<div style={{ display: "flex" }}>
<ColorBox mode="primary">primary</ColorBox>
<ColorBox mode="secondary">secondary</ColorBox>
</div>
</ThemeTester>

<ImageModal images={[img1]} />
</React.Fragment>;
```
3 changes: 1 addition & 2 deletions src/components/atoms/AsideMenu/AsideMenu.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```js
import { useState } from "react";
import { ImageModal, ThemeTester } from "../../../styleguide";
import { ThemeTester } from "../../../styleguide";
import img1 from "./AsideMenu.png";
import { Text } from "../../..";
import data from "./mock.json";
Expand Down Expand Up @@ -29,6 +29,5 @@ const [selected, setSelected] = useState(
))}
</nav>
</ThemeTester>
<ImageModal images={[img1]} />
</React.Fragment>;
```
5 changes: 0 additions & 5 deletions src/components/atoms/Avatar/Avatar.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
```js
import { GlobalThemeProvider } from "../../../theme/provider";
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./Avatar.png";
import img2 from "./AvatarExample.png";
import ThemeTester from "../../../styleguide/ThemeTester";

<React.Fragment>
Expand All @@ -13,7 +10,5 @@ import ThemeTester from "../../../styleguide/ThemeTester";
<Avatar src={img2} alt={"custom alt"} size={"small"} />
<Avatar src={img2} alt={"custom alt"} size={"extraSmall"} />
</ThemeTester>

<ImageModal images={[img1]} />
</React.Fragment>;
```
4 changes: 1 addition & 3 deletions src/components/atoms/Badge/Badge.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
```js
import img1 from "./Badge.png";
import { ImageModal, ThemeTester } from "../../../styleguide";
import { ThemeTester } from "../../../styleguide";

<React.Fragment>
<ThemeTester>
Expand All @@ -9,6 +8,5 @@ import { ImageModal, ThemeTester } from "../../../styleguide";
<Badge>Crazy </Badge>
<Badge>Exclusive </Badge>
</ThemeTester>
<ImageModal images={[img1]} />
</React.Fragment>;
```
2 changes: 1 addition & 1 deletion src/components/atoms/BreadCrumbs/BreadCrumbs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```jsx
import { ImageModal, ThemeTester } from "../../../styleguide";
import { ThemeTester } from "../../../styleguide";

import { Link } from "../../../";

Expand Down
4 changes: 0 additions & 4 deletions src/components/atoms/Button/Button.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ React component example:
### Default themes

```js
import img1 from "./Button.png";
import ImageModal from "../../../styleguide/ImageModal";
import ThemeTester from "../../../styleguide/ThemeTester";
import { useTranslation } from "react-i18next";

Expand Down Expand Up @@ -64,7 +62,5 @@ const Icon = () => {
<Icon />
</Button>
</ThemeTester>

<ImageModal images={[img1]} />
</React.Fragment>;
```
3 changes: 0 additions & 3 deletions src/components/atoms/Card/Card.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { IconTitle } from "../IconTitle/IconTitle";
import { Button } from "../Button/Button";
import { useState } from "react";
import { CourseCard } from "../../molecules/CourseCard/CourseCard";
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./Card.png";

<React.Fragment>
<ThemeTester flexDirection="column">
Expand Down Expand Up @@ -66,6 +64,5 @@ import img1 from "./Card.png";
/>
</div>
</ThemeTester>
<ImageModal images={[img1]} />
</React.Fragment>;
```
3 changes: 0 additions & 3 deletions src/components/atoms/CourseProgress/CourseProgress.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
```js
import { useState } from "react";
import { GlobalThemeProvider } from "../../../theme/provider";
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./CourseProgress.png";

import ThemeTester from "../../../styleguide/ThemeTester";
import Button from "../Button/Button";
Expand Down Expand Up @@ -35,6 +33,5 @@ const Icon1 = () => (
Click to generate random progress
</Button>
</GlobalThemeProvider>
<ImageModal images={[img1]} />
</React.Fragment>;
```
4 changes: 0 additions & 4 deletions src/components/atoms/Download/Download.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import Download from "./Download";
import themes from "../../../theme";
import Title from "../../atoms/Typography/Title";
import ThemeTester from "../../../styleguide/ThemeTester";
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./Download.png";

<React.Fragment>
<ThemeTester childrenListStyle={{ display: "block" }}>
Expand All @@ -21,7 +19,5 @@ import img1 from "./Download.png";
fileName={<strong>Styled Long file name with extension.pdf</strong>}
/>
</ThemeTester>

<ImageModal images={[img1]} />
</React.Fragment>;
```
4 changes: 0 additions & 4 deletions src/components/atoms/IconText/IconText.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
```js
import { GlobalThemeProvider } from "../../../theme/provider";
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./IconText.png";
import ThemeTester from "../../../styleguide/ThemeTester";

const Icon1 = () => (
Expand All @@ -15,7 +13,5 @@ const Icon1 = () => (
<IconText icon={<Icon1 />} text={"My example text"} />
<IconText icon={<Icon1 />} text={"My example text"} />
</ThemeTester>

<ImageModal images={[img1]} />
</React.Fragment>;
```
4 changes: 0 additions & 4 deletions src/components/atoms/IconTitle/IconTitle.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
```js
import { GlobalThemeProvider } from "../../../theme/provider";
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./IconTitle.png";
import ThemeTester from "../../../styleguide/ThemeTester";

const Icon1 = () => (
Expand Down Expand Up @@ -37,7 +35,5 @@ const Icon1 = () => (
icon={<Icon1 />}
/>
</ThemeTester>

<ImageModal images={[img1]} />
</React.Fragment>;
```
3 changes: 0 additions & 3 deletions src/components/atoms/Input/Input.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
```js
import { useState } from "react";
import { GlobalThemeProvider } from "../../../theme/provider";
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./Input.png";
import ThemeTester from "../../../styleguide/ThemeTester";

const [text, setText] = useState("lorem ipsum");
Expand Down Expand Up @@ -84,6 +82,5 @@ const [texts, setTexts] = useState({
/>
</div>
</ThemeTester>
<ImageModal images={[img1]} />
</React.Fragment>;
```
2 changes: 0 additions & 2 deletions src/components/atoms/Interval/Interval.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
```js
import img1 from "./Interval.png";
import ImageModal from "../../../styleguide/ImageModal";
import ThemeTester from "../../../styleguide/ThemeTester";

<React.Fragment>
Expand All @@ -12,6 +11,5 @@ import ThemeTester from "../../../styleguide/ThemeTester";
<Interval current={5} max={100} />
<Interval current={0} max={100} />
</ThemeTester>
<ImageModal images={[img1]} />
</React.Fragment>;
```
3 changes: 0 additions & 3 deletions src/components/atoms/Link/Link.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
```js
import ThemeTester from "../../../styleguide/ThemeTester";
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./Link.png";

<>
<ThemeTester>
Expand All @@ -15,6 +13,5 @@ import img1 from "./Link.png";
Onet
</Link>
</ThemeTester>
<ImageModal images={[img1]} />
</>;
```
4 changes: 0 additions & 4 deletions src/components/atoms/Logo/Logo.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
```js
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./Logo.png";
import img2 from "./Logo-2.png";
import logo1 from "./logo-placeholder.png";
import logo2 from "./logo-placeholder2.png";
import Text from "../Typography/Text";
Expand All @@ -24,6 +21,5 @@ import ThemeTester from "../../../styleguide/ThemeTester";
</div>
</div>
</ThemeTester>
<ImageModal images={[img1, img2]} />
</React.Fragment>;
```
5 changes: 1 addition & 4 deletions src/components/atoms/Modal/Modal.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
```js
import { useState } from "react";
import { ImageModal, ThemeTester } from "../../../styleguide";
import img1 from "./Modal.png";
import { ThemeTester } from "../../../styleguide";
import { Button, Title, Text } from "../../..";

const ModalWrapper = () => {
Expand Down Expand Up @@ -40,7 +39,5 @@ const ModalWrapper = () => {
<ThemeTester>
<ModalWrapper />
</ThemeTester>

<ImageModal images={[img1]} />
</React.Fragment>;
```
3 changes: 0 additions & 3 deletions src/components/atoms/Note/Note.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
```js
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./note.png";
import ThemeTester from "../../../styleguide/ThemeTester";

<React.Fragment>
Expand All @@ -15,6 +13,5 @@ import ThemeTester from "../../../styleguide/ThemeTester";
color={"#09c3bc"}
/>
</ThemeTester>
<ImageModal images={[img1]} />
</React.Fragment>;
```
2 changes: 1 addition & 1 deletion src/components/atoms/NoteAction/NoteAction.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```js
import { ImageModal, ThemeTester } from "../../../styleguide";
import { ThemeTester } from "../../../styleguide";
import { Link, Title, Text } from "../../../";
const DownloadIcon = () => (
<svg
Expand Down
4 changes: 0 additions & 4 deletions src/components/atoms/Option/Checkbox.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
```js
import { GlobalThemeProvider } from "../../../theme/provider";
import ImageModal from "../../../styleguide/ImageModal";
import Text from "../Typography/Text";
import img1 from "./Option.png";
import ThemeTester from "../../../styleguide/ThemeTester";
import { getUniqueId } from "../../../utils/utils";

Expand Down Expand Up @@ -33,7 +31,5 @@ import { getUniqueId } from "../../../utils/utils";
/>
<Checkbox name="c7" label={<strong>dummy label</strong>} defaultChecked />
</ThemeTester>

<ImageModal images={[img1]} />
</React.Fragment>;
```
4 changes: 0 additions & 4 deletions src/components/atoms/Option/Radio.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
```js
import { GlobalThemeProvider } from "../../../theme/provider";
import ImageModal from "../../../styleguide/ImageModal";
import Text from "../Typography/Text";
import img1 from "./Option.png";
import ThemeTester from "../../../styleguide/ThemeTester";
import { getUniqueId } from "../../../utils/utils";

Expand Down Expand Up @@ -33,7 +31,5 @@ import { getUniqueId } from "../../../utils/utils";
/>
<Radio name="r5" defaultChecked label={<strong>dummy label</strong>} />
</ThemeTester>

<ImageModal images={[img1]} />
</React.Fragment>;
```
4 changes: 1 addition & 3 deletions src/components/atoms/PricingCard/PricingCard.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```js
import { useState } from "react";
import { Row, Col } from "react-grid-system";
import { ThemeTester, ImageModal } from "../../../styleguide";
import { ThemeTester } from "../../../styleguide";
import { IconText, Button, CourseProgress, Link, Text } from "../../..";
import { Title } from "../../atoms/Typography/Title";
import { MarkdownRenderer } from "../../molecules/MarkdownRenderer/MarkdownRenderer";
Expand Down Expand Up @@ -300,7 +300,5 @@ const props = {
</PricingCard>
</div>
</ThemeTester>

<ImageModal images={[img1]} />
</React.Fragment>;
```
3 changes: 0 additions & 3 deletions src/components/atoms/ProgressBar/ProgressBar.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
```js
import { GlobalThemeProvider } from "../../../theme/provider";
import { useState } from "react";
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./ProgressBar.png";
import ThemeTester from "../../../styleguide/ThemeTester";
import Button from "../Button/Button";

Expand Down Expand Up @@ -41,6 +39,5 @@ const setRandomProgresses = () => {
Click to generate random progress
</Button>
</ThemeTester>
<ImageModal images={[img1]} />
</GlobalThemeProvider>;
```
2 changes: 0 additions & 2 deletions src/components/atoms/Rating/Rating.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
```js
import img1 from "./Rating.png";
import ImageModal from "../../../styleguide/ImageModal";
import ThemeTester from "../../../styleguide/ThemeTester";

<React.Fragment>
Expand All @@ -13,6 +12,5 @@ import ThemeTester from "../../../styleguide/ThemeTester";
<Rating ratingValue={1} />
<Rating ratingValue={0} />
</ThemeTester>
<ImageModal images={[img1]} />
</React.Fragment>;
```
3 changes: 0 additions & 3 deletions src/components/atoms/Tabs/Tabs.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
```js
import ThemeTester from "../../../styleguide/ThemeTester";
import ImageModal from "../../../styleguide/ImageModal";
import { Text } from "../../../";
import img1 from "./Tabs.png";

const props = {
tabs: [
Expand Down Expand Up @@ -44,6 +42,5 @@ const props = {
<Tabs tabs={props.tabs} />
</div>
</ThemeTester>
<ImageModal images={[img1]} />
</React.Fragment>;
```
4 changes: 1 addition & 3 deletions src/components/atoms/Tag/Tag.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
```js
import { ThemeTester, ImageModal } from "../../../styleguide";
import img1 from "./Tags.png";
import { ThemeTester } from "../../../styleguide";

<>
<ThemeTester>
Expand All @@ -9,6 +8,5 @@ import img1 from "./Tags.png";
<Tag>nowość</Tag>
<Tag onClick={() => console.log("click")}>Clickable tag</Tag>
</ThemeTester>
<ImageModal images={[img1]} />
</>;
```
3 changes: 0 additions & 3 deletions src/components/atoms/TextArea/TextArea.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
```js
import { useState } from "react";
import ImageModal from "../../../styleguide/ImageModal";
import img1 from "./TextArea.png";
import ThemeTester from "../../../styleguide/ThemeTester";

const [text, setText] = useState("lorem ipsum");
Expand Down Expand Up @@ -77,6 +75,5 @@ const [texts, setTexts] = useState({
}
/>
</ThemeTester>
<ImageModal images={[img1]} />
</React.Fragment>;
```
Loading