How to use the webiny-app.createComponent function in webiny-app

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-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 });
github webiny / webiny-js / packages / webiny-app-ui / src / components / Dropdown / Dropdown.js View on Github external
Dropdown.defaultProps = {
    align: "normal",
    caret: true,
    closeOnClick: true,
    disabled: false,
    listStyle: null,
    className: null,
    onShow: _.noop,
    onShown: _.noop,
    onHide: _.noop,
    onHidden: _.noop,
    type: "default"
};

export default createComponent(Dropdown, { styles });
github webiny / webiny-js / packages / webiny-app-ui / src / components / Panel / Header.jsx View on Github external
const classes = classSet(this.props.styles.header, this.props.className);
        return (
            <div style="{this.props.style">
                {icon} {this.props.title}
                {this.props.children}
            </div>
        );
    }
}

Header.defaultProps = {
    title: null,
    icon: null
};

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

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

Body.defaultProps = {
    style: null
};

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

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

Body.defaultProps = {
    noPadding: false,
    noColor: false,
};

export default createComponent(Body, { modules: ['Panel'], styles });
github webiny / webiny-js / packages / webiny-app-ui / src / components / Modal / Components / Body.js View on Github external
this.props.noPadding &amp;&amp; styles.noPadding,
                    this.props.className
                )}
            &gt;
                {this.props.children}
            
        );
    }
}

Body.defaultProps = {
    noPadding: false,
    style: null
};

export default createComponent(Body, { styles });

webiny-app

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

MIT
Latest version published 5 years ago

Package Health Score

60 / 100
Full package analysis

Similar packages