Skip to content

Commit

Permalink
feat(docs): add badge for only sc components
Browse files Browse the repository at this point in the history
  • Loading branch information
iljs committed Dec 25, 2024
1 parent e053a7d commit 7afb57e
Show file tree
Hide file tree
Showing 42 changed files with 308 additions and 30 deletions.
4 changes: 3 additions & 1 deletion website/plasma-b2c-docs/docs/components/AudioPlayer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ id: AudioPlayer
title: AudioPlayer
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# AudioPlayer

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="AudioPlayer" />
<PropsTable name="AudioPlayer" />
<StorybookLink name="AudioPlayer" />
Expand Down
5 changes: 4 additions & 1 deletion website/plasma-b2c-docs/docs/components/Card.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ id: card
title: Card
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Card

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

Набор компонентов для создания карточек.

<StorybookLink name="Card" />
Expand Down
5 changes: 4 additions & 1 deletion website/plasma-b2c-docs/docs/components/Carousel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ id: carousel
title: Carousel
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Carousel

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

Набор компонентов для создания списков с прокруткой (галерей).

<StorybookLink name="Carousel" />
Expand Down
4 changes: 3 additions & 1 deletion website/plasma-b2c-docs/docs/components/ElasticGrid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ id: ElasticGrid
title: ElasticGrid
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# ElasticGrid

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="ElasticGrid" />
<PropsTable name="ElasticGrid" />
<StorybookLink name="ElasticGrid" />
Expand Down
5 changes: 4 additions & 1 deletion website/plasma-b2c-docs/docs/components/Modal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ id: modal
title: Modal
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Modal

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="Modal" />
<PropsTable name="Modal" />
<StorybookLink name="Modal" />
Expand Down
5 changes: 4 additions & 1 deletion website/plasma-b2c-docs/docs/components/Overlay.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ id: overlay
title: Overlay
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Overlay

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="Overlay" />
<PropsTable name="Overlay" exclude={['css']} />
<StorybookLink name="Overlay" />
5 changes: 4 additions & 1 deletion website/plasma-b2c-docs/docs/components/Portal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ id: portal
title: Portal
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Portal

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="Portal" />
<PropsTable name="Portal" exclude={['css']} />
<StorybookLink name="Portal" />
Expand Down
4 changes: 3 additions & 1 deletion website/plasma-b2c-docs/docs/components/PreviewGallery.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ id: PreviewGallery
title: PreviewGallery
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# PreviewGallery

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="PreviewGallery" />
<PropsTable name="PreviewGallery" />
<StorybookLink name="PreviewGallery" />
Expand Down
4 changes: 3 additions & 1 deletion website/plasma-b2c-docs/docs/components/Upload.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ id: Upload
title: Upload
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Upload

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="Upload" />
<PropsTable name="Upload" />
<StorybookLink name="Upload" />
Expand Down
7 changes: 5 additions & 2 deletions website/plasma-b2c-docs/docs/components/UploadAudio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ id: UploadAudio
title: UploadAudio
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# UploadAudio

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

## UploadAudio
<Description name="UploadAudio" />
<PropsTable name="UploadAudio" />
<StorybookLink name="UploadAudio" />
Expand Down
4 changes: 3 additions & 1 deletion website/plasma-b2c-docs/docs/components/UploadVisual.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ id: UploadVisual
title: UploadVisual
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# UploadVisual

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="UploadVisual" />
<PropsTable name="UploadVisual" />
<StorybookLink name="UploadVisual" />
Expand Down
29 changes: 29 additions & 0 deletions website/plasma-b2c-docs/src/components/Badge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import type { FC } from 'react';
import { Badge, Tooltip, BodyXS } from '@salutejs/plasma-b2c';

export const DocsBadge: FC<{ title: string; desctiption: string }> = ({ title, desctiption }) => (
<div
style={{
marginTop: '-22px',
marginBottom: '16px',
}}
>
<Tooltip
target={
<Badge size="m" view="accent">
<BodyXS bold>{title}</BodyXS>
</Badge>
}
text={desctiption}
placement="right-start"
trigger="hover"
hoverTimeout={500}
maxWidth="400px"
hasArrow={false}
style={{
verticalAlign: 'middle',
}}
/>
</div>
);
1 change: 1 addition & 0 deletions website/plasma-b2c-docs/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export { CodeSandbox } from './CodeSandbox';
export { Description } from './Description';
export { PropsTable } from './PropsTable';
export { StorybookLink } from './Storybook';
export { DocsBadge as Badge } from './Badge';
4 changes: 3 additions & 1 deletion website/plasma-giga-docs/docs/components/Overlay.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ id: overlay
title: Overlay
---

import { PropsTable, Description } from '@site/src/components';
import { PropsTable, Description, Badge } from '@site/src/components';

# Overlay

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />
<Description name="Overlay" />
<PropsTable name="Overlay" exclude={['css']} />
5 changes: 4 additions & 1 deletion website/plasma-giga-docs/docs/components/Portal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ id: portal
title: Portal
---

import { PropsTable, Description } from '@site/src/components';
import { PropsTable, Description, Badge } from '@site/src/components';

# Portal

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="Portal" />
<PropsTable name="Portal" exclude={['css']} />

Expand Down
29 changes: 29 additions & 0 deletions website/plasma-giga-docs/src/components/Badge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import type { FC } from 'react';
import { Badge, Tooltip, BodyXS } from '@salutejs/plasma-giga';

export const DocsBadge: FC<{ title: string; desctiption: string }> = ({ title, desctiption }) => (
<div
style={{
marginTop: '-22px',
marginBottom: '16px',
}}
>
<Tooltip
target={
<Badge size="m" view="accent">
<BodyXS bold>{title}</BodyXS>
</Badge>
}
text={desctiption}
placement="right-start"
trigger="hover"
hoverTimeout={500}
maxWidth="400px"
hasArrow={false}
style={{
verticalAlign: 'middle',
}}
/>
</div>
);
1 change: 1 addition & 0 deletions website/plasma-giga-docs/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { CodeSandbox } from './CodeSandbox';
export { Description } from './Description';
export { PropsTable } from './PropsTable';
export { DocsBadge as Badge } from './Badge';
4 changes: 3 additions & 1 deletion website/plasma-web-docs/docs/components/AudioPlayer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ id: AudioPlayer
title: AudioPlayer
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# AudioPlayer

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="AudioPlayer" />
<PropsTable name="AudioPlayer" />
<StorybookLink name="AudioPlayer" />
Expand Down
5 changes: 4 additions & 1 deletion website/plasma-web-docs/docs/components/Card.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ id: card
title: Card
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Card

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

Набор компонентов для создания карточек.

<StorybookLink name="Card" />
Expand Down
5 changes: 4 additions & 1 deletion website/plasma-web-docs/docs/components/Carousel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ id: carousel
title: Carousel
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Carousel

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

Набор компонентов для создания списков с прокруткой (галерей).

<StorybookLink name="Carousel" />
Expand Down
4 changes: 3 additions & 1 deletion website/plasma-web-docs/docs/components/ElasticGrid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ id: ElasticGrid
title: ElasticGrid
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# ElasticGrid

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="ElasticGrid" />
<PropsTable name="ElasticGrid" />
<StorybookLink name="ElasticGrid" />
Expand Down
4 changes: 3 additions & 1 deletion website/plasma-web-docs/docs/components/Modal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ id: modal
title: Modal
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Modal

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />
<Description name="Modal" />
<PropsTable name="Modal" />
<StorybookLink name="Modal" />
Expand Down
4 changes: 3 additions & 1 deletion website/plasma-web-docs/docs/components/Overlay.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ id: overlay
title: Overlay
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Overlay

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />
<Description name="Overlay" />
<PropsTable name="Overlay" exclude={['css']} />
<StorybookLink name="Overlay" />
4 changes: 3 additions & 1 deletion website/plasma-web-docs/docs/components/Portal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ id: portal
title: Portal
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Portal

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />
<Description name="Portal" />
<PropsTable name="Portal" exclude={['css']} />
<StorybookLink name="Portal" />
Expand Down
4 changes: 3 additions & 1 deletion website/plasma-web-docs/docs/components/PreviewGallery.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ id: PreviewGallery
title: PreviewGallery
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# PreviewGallery

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="PreviewGallery" />
<PropsTable name="PreviewGallery" />
<StorybookLink name="PreviewGallery" />
Expand Down
4 changes: 3 additions & 1 deletion website/plasma-web-docs/docs/components/Upload.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ id: Upload
title: Upload
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

# Upload

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />

<Description name="Upload" />
<PropsTable name="Upload" />
<StorybookLink name="Upload" />
Expand Down
6 changes: 4 additions & 2 deletions website/plasma-web-docs/docs/components/UploadAudio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ id: UploadAudio
title: UploadAudio
---

import { PropsTable, Description, StorybookLink } from '@site/src/components';
import { PropsTable, Description, StorybookLink, Badge } from '@site/src/components';

## UploadAudio
# UploadAudio

<Badge title="styled-components" desctiption="Доступен только в сборке `styled-components`" />
<Description name="UploadAudio" />
<PropsTable name="UploadAudio" />
<StorybookLink name="UploadAudio" />
Expand Down
Loading

0 comments on commit 7afb57e

Please sign in to comment.