How to use the webiny-app.i18n.namespace 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-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 (

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