Skip to content

Commit

Permalink
feat: Add components categories
Browse files Browse the repository at this point in the history
  • Loading branch information
taorepoara committed Feb 28, 2023
1 parent 669f876 commit f7a1e0d
Show file tree
Hide file tree
Showing 22 changed files with 88 additions and 22 deletions.
5 changes: 4 additions & 1 deletion docs/src/pages/components/actionable.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/actionable.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "basic", "interaction" ]
};

This component makes its child actionable based on the defined properties.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/button.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "form", "interaction" ]
};

This is the button component.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/checkbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/checkbox.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "form" ]
};

This component provides a toggleable checkbox with several presentation options.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/container.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/container.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "basic", "layout" ]
};

The container component that can be used to apply border, padding, constraints or decoration to its child.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/dropdownButton.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/dropdownButton.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "interaction" ]
};

A dropdown button that can be used to open a dropdown menu when clicked.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/flex.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/flex.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "basic", "layout" ]
};

The Flex component is a container that displays its children in a row or column.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/flexible.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/flexible.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "basic", "layout" ]
};

The Flexible component can be used to define the way in which its child flexes.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/form.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "form" ]
};

The Form component is a container that dispatches an event with all its containing field values.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/icon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/icon.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "basic" ]
};

All of the possible values for the icon come from the [material design icons](https://api.flutter.dev/flutter/material/Icons-class.html#constants).

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/image.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/image.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "basic" ]
};

This component can be used to load an image online or directly from the application.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/menu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/menu.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "interaction" ]
};

This component is meant to be used along with the `menuItem` component because there is no real interest of using it alone.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/menuItem.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/menuItem.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "interaction" ]
};

This component is made to be used with the `menu` component. This will ensure that the styling is correct and that the menu items are properly sized.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/overlayEntry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/overlayEntry.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "layout" ]
};

This component is used to create an **overlay** that shows itself over the current application's UI. For example, it might be interesting to use it when displaying errors in a snackbar.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/radio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/radio.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "form", "interaction" ]
};

This component is basically a radio component as you might know it from other frameworks.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/slider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/slider.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "form", "interaction" ]
};

The slider component can be used to select from a **range** of values.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/stack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/stack.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "layout" ]
};

This component is used to make its children overlap. This is particularly interesting when building complex views that needs to put some content above an image or for styling some views.
The first child in the list will be in the background while the last child of the list will be in the foreground of the stack.
Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/statusSticker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/statusSticker.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: []
};

This component is a status based sticker. It can take 4 different statuses, `success`, `warning`, `error` and `pending`

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/text.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "basic" ]
};

This is a typical text component.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/textfield.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/textfield.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "form", "interaction" ]
};

This component gives the possibility to the user to write text.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/toggle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/toggle.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "form", "interaction" ]
};

This component can be toggled on or off.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/view.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/view.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "basic", "layout" ]
};

This component calls a view defined in the application. This can be used to create reusable views across the application and call them from anywhere.

Expand Down
5 changes: 4 additions & 1 deletion docs/src/pages/components/wrap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import PropertyTable from '../../components/propertyTable';
import CodeBlock from '../../components/codeBlock';
import schema from '../../../../api/components/wrap.schema.json';
import {jsonData} from '../../utils';
export const json = jsonData(schema);
export const json = {
...jsonData(schema),
categories: [ "layout" ]
};

This component can be used to display a long list of components, if they get out of the screen the wrap component will make the overflowing ones use a new row.

Expand Down

0 comments on commit f7a1e0d

Please sign in to comment.