Skip to content

Commit

Permalink
Version 2.1.3, add dismissible option for modals
Browse files Browse the repository at this point in the history
  • Loading branch information
mainsmirnov committed May 4, 2024
1 parent 65cdd79 commit 0d01aad
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@telegram-apps/telegram-ui",
"version": "2.1.2",
"version": "2.1.3",
"description": "World-class, ultimate UI developer toolkit.",
"main": "dist/cjs/index.js",
"module": "dist/index.js",
Expand Down
12 changes: 6 additions & 6 deletions src/Getting Started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Getting started is a breeze with npm or yarn. Simply run:
**npm:**

```sh
npm install @xelene/tgui
npm install @telegram-apps/telegram-ui
```

**yarn:**

```sh
yarn add @xelene/tgui
yarn add @telegram-apps/telegram-ui
```

## Smooth Development Process
Expand All @@ -27,15 +27,15 @@ Follow these simple steps to kickstart your development journey:
Before diving into the development, ensure to import the necessary styles:

```jsx
import '@xelene/tgui/dist/styles.css';
import '@telegram-apps/telegram-ui/dist/styles.css';
```

### 2. Wrap Your App

Next, wrap your application with `AppRoot` to leverage our platform's features:

```jsx
import { AppRoot } from '@xelene/tgui';
import { AppRoot } from '@telegram-apps/telegram-ui';

ReactDOM.render(
<AppRoot>
Expand All @@ -49,10 +49,10 @@ ReactDOM.render(

```jsx
// Import the necessary styles globally
import '@xelene/tgui/dist/styles.css';
import '@telegram-apps/telegram-ui/dist/styles.css';

// Import components from the library
import { AppRoot, Cell, List, Section } from '@xelene/tgui';
import { AppRoot, Cell, List, Section } from '@telegram-apps/telegram-ui';

// Example data for rendering list cells
const cellsTexts = ['Chat Settings', 'Data and Storage', 'Devices'];
Expand Down
3 changes: 1 addition & 2 deletions src/components/Overlays/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onAnim
fadeFromIndex?: never;
/** Determines if the modal can be closed by user interactions */
dismissible?: boolean;

}

type ModalWithComponents = ForwardRefExoticComponent<ModalProps & RefAttributes<HTMLDivElement>> & {
Expand Down Expand Up @@ -76,7 +75,7 @@ export const Modal = forwardRef<HTMLDivElement, ModalProps>(({
fadeFromIndex,
modal,
preventScrollRestoration,
dismissible
dismissible,
...restProps
}, ref) => {
const container = useAppRootContext();
Expand Down

0 comments on commit 0d01aad

Please sign in to comment.