Skip to content

Latest commit

 

History

History
83 lines (62 loc) · 2.82 KB

elements.stories.mdx

File metadata and controls

83 lines (62 loc) · 2.82 KB

import { Meta, Canvas } from '@storybook/addon-docs'; import { Container, Row, Column, Button, Avatar, Itchio, useTooltipExtension } from '../packages/react/src'; import { Customization } from '../.storybook/components';

<Meta title="📗Documentation/Elements" parameters={{ previewTabs: { canvas: { hidden: true } } }} />

Typology of Elements

Papanasi has four different types of elements, that ones are: layout, components, enterprise and extensions. Each type has a different purpose and a different way of being used, explained in the next lines.

Layout

Those elements are made to help the developer to create a basic layout for any page, that kind of elements exist in all the UI Libraries that you can imagine, and they are the ones that you will use the most.

What makes these from Papanasi different is that they are fully customizable. You can use them as they are, or you can customize them to fit your needs.

Some examples are Container, Row and Column.

Row 1 - Column 1 of 3 Row 1 - Column 2 of 3 Row 1 - Column 3 of 3 Row 2 - Column 1 of 3 Row 2 - Column 2 of 3 Row 2 - Column 3 of 3 Row 3 - Column 1 of 3 Row 3 - Column 2 of 3 Row 3 - Column 3 of 3

Components

Are the core of Papanasi, all the components should follow the manifesto, should be also customizable from global or scoped variables.

Most popular components are Button or Avatar:

Primary Tertiary

Enterprise

Those elements are the ones that are specific for a company or library, and they are not part of the core of Papanasi. The main idea is to bring the opportunity to create components from SDKs or APIs writing the code just once.

The first enterprise component was Itchio:

Click me

Extensions

Papanasi extensions are plugins that can be used to extend our functionality. Those are not components are can be used as any other library.

A good example of an extension is the Tooltip:

{(() => { useTooltipExtension(document.body.querySelector('.tooltip-example')); return ''; })()}
Hover me