Skip to content

Commit

Permalink
docs(plasma-asdk): change docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TitanKuzmich committed Nov 17, 2023
1 parent 0efae19 commit e2680f4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
14 changes: 11 additions & 3 deletions packages/plasma-asdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
```bash
$ npm install --save react react-dom
$ npm install --save styled-components
$ npm install --save @salutejs/plasma-asdk @salutejs/plasma-tokens @salutejs/plasma-typo
$ npm install --save @salutejs/plasma-asdk @salutejs/plasma-typo
```

## Настройка
Expand All @@ -31,7 +31,7 @@ $ npm install --save @salutejs/plasma-asdk @salutejs/plasma-tokens @salutejs/pla
```jsx title="GlobalStyle.tsx"
import { createGlobalStyle } from 'styled-components';
import { standard } from '@salutejs/plasma-typo';
import { stylesSalute__light as stylesSaluteLight } from '@salutejs/plasma-asdk';
import { stylesSaluteLight } from '@salutejs/plasma-asdk/tokens';

const ThemeStyle = createGlobalStyle(stylesSaluteLight);
const TypoStyle = createGlobalStyle(standard);
Expand Down Expand Up @@ -61,7 +61,15 @@ export const GlobalStyle = () => (
// App.tsx
import { Button } from '@salutejs/plasma-asdk';

import { tokens } from '@salutejs/plasma-asdk/tokens';

export const App = () => {
return <Button>Hello, Plasma!</Button>;
return (
<Button>Hello, Plasma!</Button>

<p style={{color: tokens.textAccentAthena}}>
Token usage example
</p>
);
};
```
15 changes: 10 additions & 5 deletions packages/plasma-asdk/README.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Meta } from "@storybook/addon-docs";
```bash
$ npm install --save react react-dom
$ npm install --save styled-components
$ npm install --save @salutejs/plasma-asdk @salutejs/plasma-tokens @salutejs/plasma-typo
$ npm install --save @salutejs/plasma-asdk @salutejs/plasma-typo
```

## Настройка
Expand All @@ -34,9 +34,7 @@ $ npm install --save @salutejs/plasma-asdk @salutejs/plasma-tokens @salutejs/pla
```jsx title="GlobalStyle.tsx"
import { createGlobalStyle } from 'styled-components';
import { standard } from '@salutejs/plasma-typo';
import {
stylesSalute__light as stylesSaluteLight
} from '@salutejs/plasma-asdk';
import { stylesSaluteLight } from '@salutejs/plasma-asdk/tokens';

const ThemeStyle = createGlobalStyle(stylesSaluteLight);
const TypoStyle = createGlobalStyle(standard);
Expand Down Expand Up @@ -64,8 +62,15 @@ export const GlobalStyle = () => (
```jsx
// App.tsx
import { Button } from '@salutejs/plasma-asdk';
import { tokens } from '@salutejs/plasma-asdk/tokens';

export const App = () => {
return <Button>Hello, Plasma!</Button>;
return (
<Button>Hello, Plasma!</Button>

<p style={{color: tokens.textAccentAthena}}>
Token usage example
</p>
);
};
```
2 changes: 1 addition & 1 deletion packages/plasma-asdk/api/plasma-asdk.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { ReactNode } from 'react';
import { RefAttributes } from 'react';
import { SpacingProps } from '@salutejs/plasma-new-hope/types/mixins/applySpacing';
import { SpinnerProps } from '@salutejs/plasma-core';
import { SSRProvider } from '@salutejs/plasma-hope';
import { SSRProvider } from '@salutejs/plasma-core';
import { StyledComponent } from 'styled-components';
import { SubtitleProps } from '@salutejs/plasma-new-hope/styled-components';
import { TouchEventHandler } from 'react';
Expand Down

0 comments on commit e2680f4

Please sign in to comment.