How to use nav-frontend-typografi - 2 common examples

To help you get started, we’ve selected a few nav-frontend-typografi 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 / examples / legacy / src / index.js View on Github external
// Skrevet i ES5 så man slipper babel-avhengighet for eksempelprosjektet
const React = require('react');
const ReactDOM = require('react-dom');
const Typografi = require('nav-frontend-typografi');
const Etiketter = require('nav-frontend-etiketter');
const Paneler = require('nav-frontend-paneler');

const createElement = React.createElement;
const Sidetittel = Typografi.Sidetittel;
const Panel = Paneler.Panel;
const AdvarselEtikett = Etiketter.EtikettAdvarsel;

function Application() {
    return createElement('div', {},
        createElement(Panel, {},
            createElement(Sidetittel, {}, 'Test')
        ),
        createElement(Panel, {},
            createElement(AdvarselEtikett, {}, 'Oops')
        )
    );
}

ReactDOM.render(createElement(Application), document.getElementById('application'));
github navikt / nav-frontend-moduler / examples / webpack / src / index.js View on Github external
// Skrevet i ES5 så man slipper babel-avhengighet for eksempelprosjektet
const React = require('react');
const ReactDOM = require('react-dom');
const Typografi = require('nav-frontend-typografi');
const Etiketter = require('nav-frontend-etiketter');
const Paneler = require('nav-frontend-paneler');
require('./index.less');
const HakeIkon = require('file-loader!nav-frontend-ikoner-assets/assets/stegindikator__hake.svg');

const createElement = React.createElement;
const Sidetittel = Typografi.Sidetittel;
const Panel = Paneler.Panel;
const AdvarselEtikett = Etiketter.EtikettAdvarsel;

function Application() {
    return createElement('div', {},
        createElement(Panel, {},
            createElement(Sidetittel, {}, 'Test')
        ),
        createElement(Panel, {},
            createElement(AdvarselEtikett, {}, 'Oops')
        ),
        createElement('img', { src: HakeIkon, alt: ''})
    );
}

ReactDOM.render(createElement(Application), document.getElementById('application'));

nav-frontend-typografi

Alle typografi elementer er implementer i `TypografiBase`, men alle subtyper er allerede definert.

MIT
Latest version published 2 years ago

Package Health Score

64 / 100
Full package analysis

Popular nav-frontend-typografi functions

Similar packages