How to use webiny-app - 10 common examples

To help you get started, we’ve selected a few webiny-app examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / webiny-app-ui / src / components / Tabs / TabHeader.jsx View on Github external
// TODO: const i18n = React.isValidElement(label) && isElementOfType(label, i18n.getComponent());
        // if (_.isString(this.props.label) || i18n) {
        if (_.isString(this.props.label)) {
            const { Icon } = this.props.modules;
            label = (
                <a>
                    {this.props.icon ?  : null}
                    <span>{label}</span>
                </a>
            );
        }
        return label;
    }
};

export default createComponent(TabHeader, { modules: ['Icon'], styles });
github webiny / webiny-js / packages / webiny-app-ui / src / components / Wizard / Step / Actions / Action.js View on Github external
const { render, modules: { Button }, ...props } = this.props;

        if (render) {
            return render.call(this);
        }

        return <button>;
    }
}

// Receives all standard Button component props
Action.defaultProps = {
    wizard: null
};

export default createComponent(Action, { modules: ["Button"] });
</button>
github webiny / webiny-js / packages / webiny-app-security / src / admin / views / GroupsForm / Access / EntitiesList.jsx View on Github external
import React from "react";
import css from "./EntitiesList.scss";
import { createComponent, i18n } from "webiny-app";
import _ from "lodash";
import classNames from "classnames";

const t = i18n.namespace("Security.PermissionsForm.Scopes.ClassesLists");

class EntitiesList extends React.Component {
    constructor() {
        super();
        this.state = {
            filter: null
        };
    }

    renderListItem(entity) {
        const { Checkbox } = this.props.modules;
        const selected = this.props.entities.current === entity;

        const modelPath = `permissions.entities.${entity.id}`;

        return (
github webiny / webiny-js / packages / webiny-app-cms / src / admin / views / pages / PageList.jsx View on Github external
import React from "react";
import { createComponent, i18n } from "webiny-app";
import PageFilter from "./components/PageFilter";
import PageListControls from "./components/PageListControls";
import PageContentPreview from "./components/PageContentPreview";
import CreatePageDialog from "./CreatePageDialog";
import styles from "./PageList.scss";

const t = i18n.namespace("Cms.Admin.Views.PageList");

class PageList extends React.Component {
    constructor() {
        super();

        this.state = {
            category: null
        };
    }

    render() {
        const {
            //List,
            ListData,
            View,
            Link,
github webiny / webiny-js / packages / webiny-app-ui / src / components / Settings / index.js View on Github external
import React from "react";
import { app, createComponent, i18n } from "webiny-app";

const t = i18n.namespace("Webiny.Ui.Settings");
class Settings extends React.Component {
    render() {
        if (this.props.render) {
            return this.props.render.call(this);
        }

        const growler = app.services.get("growler");

        const { Form } = this.props.modules;
        const formProps = {
            api: this.props.api,
            createHttpMethod: "patch",
            onSuccessMessage: this.props.onSuccessMessage,
            onSubmitSuccess: this.props.onSubmitSuccess,
            children: this.props.children,
            loadModel({ form }) {
github webiny / webiny-js / packages / webiny-app-ui / src / components / List / Components / Table / Actions / DeleteAction.jsx View on Github external
import React from "react";
import _ from "lodash";
import { createComponent, i18n } from "webiny-app";
import ModalAction from "./ModalAction";

const t = i18n.namespace("Webiny.Ui.List.Table.Actions");
class DeleteAction extends React.Component {
    constructor() {
        super();
        this.dialogId = _.uniqueId("delete-action-modal-");
    }

    shouldComponentUpdate(props) {
        return !_.isEqual(props.data, this.props.data);
    }

    render() {
        if (this.props.render) {
            return this.props.render.call(this);
        }

        const { message, modules: { Modal: { Confirmation } } } = this.props;
github webiny / webiny-js / packages / webiny-app-ui / src / components / Modal / Components / Confirmation.js View on Github external
import React from "react";
import _ from "lodash";
import { createComponent, i18n } from "webiny-app";
import { ModalConfirmationComponent } from "webiny-app-ui";
import Dialog from "./Dialog";
import Content from "./Content";
import Body from "./Body";
import Footer from "./Footer";

const t = i18n.namespace("Webiny.Ui.Modal.Confirmation");
class Confirmation extends React.Component {
    render() {
        const { modules: { Loader, Button }, styles, title, render } = this.props;
        if (render) {
            return render.call(this);
        }

        let content = this.props.message || this.props.children;
        if (_.isFunction(content)) {
            content = content({ data: this.props.data });
        }

        return (
github webiny / webiny-js / packages / webiny-app-ui / src / components / Modal / Components / Footer.js View on Github external
class Footer extends React.Component {
    render() {
        if (this.props.render) {
            return this.props.render.call(this);
        }

        return (
            <div>
                {this.props.children}
            </div>
        );
    }
}

export default createComponent(Footer, { styles });
github webiny / webiny-js / packages / webiny-app-ui / src / components / View / Footer.jsx View on Github external
this.props.className
        );

        return (
            
                {this.props.children}
            
        );
    }
}

Footer.defaultProps = {
    align: null
};

export default createComponent(Footer, { modules: ['Panel'], styles });
github webiny / webiny-js / packages / webiny-app-ui / src / components / Panel / Footer.jsx View on Github external
class Footer extends React.Component {
    render() {
        if (this.props.render) {
            return this.props.render.call(this);
        }

        const classes = classSet(this.props.styles.footer, this.props.className);
        return <div style="{this.props.style}">{this.props.children}</div>;
    }
}

Footer.defaultProps = {
    style: {}
};

export default createComponent(Footer, { styles });

webiny-app

The base package for building Webiny and React powered web apps.

MIT
Latest version published 6 years ago

Package Health Score

60 / 100
Full package analysis

Similar packages