How to use the nav-frontend-js-utils.omit function in nav-frontend-js-utils

To help you get started, we’ve selected a few nav-frontend-js-utils 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 navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-lesmerpanel / src / lesmerpanel.tsx View on Github external
render() {
        const {
            intro,
            children,
            apneTekst,
            lukkTekst,
            id = guid(),
            ...other
        } = this.props;
        const domProps = omit(other, 'border', 'onOpen', 'defaultApen');

        return (
            <div id="{id}">
                <div>
                    {intro}
                </div>
                <div>
                    
                        <div>
                            {children}
                        </div>
                    </div></div>
github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-toggle / src / toggle-gruppe-pure.tsx View on Github external
render() {
        const renderProps = omit(this.props, 'className', 'children', 'kompakt', 'toggles', 'defaultToggles');
        return (
            <div>
                {
                    this.props.toggles.map((toggle, i) =&gt;
                        
                    )
                }
            </div>
        );
    }
}
github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-toggle / src / toggle-knapp-pure.tsx View on Github external
render() {
        const renderProps = omit(this.props, 'children', 'pressed', 'kompakt', 'isRequired');
        const knappId = guid();
        return (
            <button aria-pressed="{this.props.pressed}" id="{knappId}" type="button">
                {this.props.children}
            </button>
        );
    }
}
github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-veileder / src / veileder.js View on Github external
render() {
        const { children, tekst, ...other } = this.props;
        const domProps = nav_frontend_js_utils_1.omit({ ...other }, 'center', 'nomask', 'says', 'color', 'transparent', 'width', 'type', 'fargetema', 'storrelse');
        return (React.createElement("div", Object.assign({ className: cls(this.props) }, domProps),
            React.createElement("div", { className: frameCls(this.props) }, children),
            tekst && this.renderSnakkeboble()));
    }
}
github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-tabs / src / tabs.tsx View on Github external
render() {
        const domProps = omit(this.props, 'tabs', 'onChange', 'defaultAktiv', 'ref');

        return (
             this.pure = pure}
                onChange={(e, index) =&gt; this.setActiveTab(e, index)}
                {...domProps}
            &gt;
                {this.renderTabs()}
            
        );
    }
}
github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-stegindikator / src / stegindikator.tsx View on Github external
render() {
        const domProps = omit(
            this.props,
            'steg',
            'children',
            'visLabel',
            'kompakt',
            'onChange',
            'onBeforeChange',
            'autoResponsiv',
            'aktivtSteg'
        );

        return (
            <div>
                <ol> { this.list = list; }}</ol></div>
github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-toggle / src / toggle-knapp.tsx View on Github external
render() {
        const renderProps = omit(this.props, 'children', 'pressed');
        return (
            
                {this.props.children}
            
        );
    }
}
github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-toggle / src / toggle-gruppe.tsx View on Github external
render() {
        const { className, ...other } = this.props;
        const renderProps = omit(other, 'children', 'multiSelect', 'toggles');
        const toggles = this.state.toggles.map((toggle, i) =&gt; ({
            ...toggle,
            kompakt: this.props.kompakt,
            onClick: (e) =&gt; this.handleClick(e, i, toggle.onClick)
        }));

        return (
            
        );
    }
}
github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-stegindikator / src / stegindikator.tsx View on Github external
return this.props.steg.map((steg, i) =&gt; {

            const stegDomProps = omit(
                steg,
                'label',
                'aktiv',
                'ferdig',
                'visLabel',
                'index',
                'onClick'
            );

            const ferdig = steg.ferdig || i &lt; this.state.aktivtSteg;
            const aktiv = i === this.state.aktivtSteg;

            return (
github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-skjema / src / textarea-controlled.tsx View on Github external
render() {
        const { defaultValue, ...other } = this.props;
        return <textarea value="{this.state.text}">;
    }
}

(TextareaControlled as React.ComponentClass).propTypes = {
    ...omit(Textarea.propTypes, 'value', 'onChange'),
    defaultValue: PT.string
};

(TextareaControlled as React.ComponentClass).defaultProps = omit(Textarea.defaultProps, 'value', 'onChange');

export default TextareaControlled;
</textarea>