8000 Custom Components · electrikmilk/javascript-ui Wiki · GitHub
[go: up one dir, main page]

Skip to content

Custom Components

Brandon Jordan edited this page Oct 13, 2023 · 8 revisions

Create a file that exports an array of elements to create a component you can use in a main view.

nav.js:

import {Header,Text} from 'javascript-ui';

export default [
    Header([
        Image('logo.png')
    ]),
];

main.js:

import {view} from 'javascript-ui';
import * as Nav from './nav.js'

window.onload = () => {
    view([
        Nav<
8000
/span>,
        Section([
            // ..
        ]),
    ]),
};
Clone this wiki locally
0