3.1.1 • Published 3 months ago

@zextras/carbonio-ui-preview v3.1.1

Weekly downloads
-
License
AGPL-3.0-only
Repository
github
Last release
3 months ago

Preview utility for Zextras Carbonio

Contributors Activity License Project Twitter

Usage

Install the package

npm i @zextras/carbonio-ui-preview

Wrap your app with the PreviewManager and the ThemeProvider

import { ThemeProvider } from "@zextras/carbonio-design-system";
import { PreviewManager } from "@zextras/carbonio-ui-preview";

// ...

<ThemeProvider>
  <PreviewManager>
    <App/>
  </PreviewManager>
</ThemeProvider>

Init the preview from within your app

import { usePreview } from "@zextras/carbonio-ui-preview";

// ...

const { initPreview } = usePreview();

initPreview([
  {
    previewType: 'image',
    id: 'id1',
    src: '...'
  },
  {
    previewType: 'pdf',
    id: 'id2',
    src: '...'
  },
  // ...
]);

And open the preview of an initialized item through its id

import { usePreview } from "@zextras/carbonio-ui-preview";

// ...

const { openPreview } = usePreview();

openPreview(id);

See the example app for a simple working example.

See the API Documentation to see the full list of the props available.

See Migration for hints about the migration to a major version.

How to build

Setup

  • clone this repo
  • install the dependencies
npm install

Build

npm run build

License

Carbonio UI Preview - UI Preview library for Zextras Carbonio

Copyright (C) 2023 Zextras https://www.zextras.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 only of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see Licenses - GNU Project - Free Software Foundation

See COPYING file for the project license details

See THIRDPARTIES file for other licenses details

Copyright and Licensing notices

All non-software material (such as, for example, names, images, logos, sounds) is owned by Zextras s.r.l. and is licensed under CC-BY-NC-SA.

Where not specified, all source files owned by Zextras s.r.l. are licensed under AGPL-3.0-only

3.1.2-devel.5

3 months ago

3.1.2-devel.4

3 months ago

3.1.2-devel.3

3 months ago

3.1.2-devel.2

3 months ago

3.1.2-devel.1

3 months ago

3.1.1

5 months ago

3.1.1-devel.1

5 months ago

3.1.0

7 months ago

3.1.0-devel.2

7 months ago

3.1.0-devel.1

8 months ago

3.0.1-devel.1

9 months ago

2.2.0

9 months ago

3.0.0

9 months ago

3.0.0-devel.1

9 months ago

2.1.0-devel.1

10 months ago

2.1.0

10 months ago

2.0.0

12 months ago

2.0.0-devel.1

12 months ago

2.0.0-devel.2

12 months ago

1.2.6-test.3

12 months ago

1.2.6-test.5

12 months ago

1.2.6-test.4

12 months ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago