0.2.94 • Published 6 years ago

odeum-app v0.2.94

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

ODEUM App

ODEUM Code Web App Framework. All the basic components to set up the ODEUM Code Web App framework with default styling, menus, tabs, routes and help.

Build Status npm NPM license

1. Components:

  • AppContainer
  • Header
  • MenuPanel
  • Menu
  • Tab
  • Workspace
  • Page
  • Footer

2. Installation

npm install odeum-app
yarn add odeum-app

3. Usage

import { 	
	AppContainer, 
	Header, 
	MenuPanel, 
	Menu, 
	Tab, 
	Footer } from 'odeum-app'

// together with ... 

import { 
	Button, 
	ButtonPanel, 
	Modal, 
	Dropdown, 
	Input, 
	Checkbox, 
	ToggleSwitch } from 'odeum-ui'

import { Heading, Text } from 'odeum-primitives'

3.1. Additional ODEUM Code packages

  • ODEUM UI (odeum-app)
  • ODEUM Primitives (odeum-primitives)

3.2. Support packages for your styling and data management

  • Styled Components (styled-components)
  • Redux (redux)
  • Code splitting
  • and all the other cool React stuff you love ...

4. How to use odeum-app

4.1. Theme

Default theme is ODEUM Code theme. The theme file contains objects for colors, fonts and sizes for the selected theme.

A theme is passed as a theme prop to the component.

If no theme is provided to the AppContainer by the user, the AppContainer loads the default theme provided in the odeum-app package.

import theme from './theme/bluehorizon.js'
...
<AppContainer theme={theme}>

On a later stage we might provide setTheme and getTheme functions to pattern check the contents of the theme file to ensure that the objects contains the required values.

4.2. Configuration:

All components exported from odeum-app and odeum-app has propTypes and defaultProps.

All defaultProps are loaded with default values so a fully scaled down App template will look like this: App_default.js

A template with named values and more props passed would look like this: App_normal.js

4.2.1. Logo

Default logo is odeumcode_logo.svg which is loaded default by Header component unless it is overwritten by the Header prop "logo={'pathtologo.svg'}"

4.2.2. Help

Help ID is initially propagated through props on Menu and Tab components through a helpID prop.

<Menu {...props} helpID={'e8ea36f3-db70-44c0-85d6-61507b029373'}>
	<Tab {...props} helpID={'386bf263-92ba-4b9e-94b6-aa3ac194af44'}>
	</Tab>
</Menu>

4.3. Routing

Routing will be encapsulated and processed by the routable components through a route prop. The routable components are:

  • AppContainer (makes the logo ('/') routable)
  • Menu
  • Tab

Examples:

<Menu {...props} route={'/dashboard'} helpID={'e8ea36f3-db70-44c0-85d6-61507b029373'}>
<Tab {...props} route={'/dashboard/timeline'} />

If no route props is provided the Menu or Tab component label will be used for automatically creating a route.

4.4. Quick Navigation

To pass styles to the responsive Quick Navigation button use the following in MenuPanel directly:

<MenuPanel quicknav={{ label: 'Quick Navigation', icon: 'menu', ... }}>

Or pass a style object:

const quicknavStyles = {
	label: 'Quick Navigation', 
	icon: 'menu',
	...
}
...
<MenuPanel quicknav={quicknavStyles}>

4.5. Login

Component that composes the actual login process for the owner app. The keep the API footprint light we only exhibits the Login component, the rest is up to the app developer.

Example:

import { 	
	..., 
	Login } from 'odeum-app'
...

this.state = {
	isLoggedIn: false
...
handleLogin = () => {	
	this.setState({ isLoggedIn: })
}


}
<Page route={'/'} exact>
	<Login loggedIn={''}>
		<LoginForm onLoginSuccess={this.handleLogin}/>
	</Login>
</Page>
0.2.94

6 years ago

0.2.93

6 years ago

0.2.92

6 years ago

0.2.91

6 years ago

0.2.90

6 years ago

0.2.89

6 years ago

0.2.88

6 years ago

0.2.87

6 years ago

0.2.86

6 years ago

0.2.85

6 years ago

0.2.84

6 years ago

0.2.83

6 years ago

0.2.82

6 years ago

0.2.80

6 years ago

0.2.79

6 years ago

0.2.78

6 years ago

0.2.77

6 years ago

0.2.76

6 years ago

0.2.75

6 years ago

0.2.74

6 years ago

0.2.73

6 years ago

0.2.72

6 years ago

0.2.71

6 years ago

0.2.70

6 years ago

0.2.69

6 years ago

0.2.68

6 years ago

0.2.67

6 years ago

0.2.66

6 years ago

0.2.65

6 years ago

0.2.64

6 years ago

0.2.63

6 years ago

0.2.62

6 years ago

0.2.61

6 years ago

0.2.60

6 years ago

0.2.59

6 years ago

0.2.58

6 years ago

0.2.57

6 years ago

0.2.56

6 years ago

0.2.55

6 years ago

0.2.53

6 years ago

0.2.52

6 years ago

0.2.51

6 years ago

0.2.50

6 years ago

0.2.48

6 years ago

0.2.47

6 years ago

0.2.46

6 years ago

0.2.45

6 years ago

0.2.44

6 years ago

0.2.43

6 years ago

0.2.42

6 years ago

0.2.41

6 years ago

0.2.40

6 years ago

0.2.39

6 years ago

0.2.38

6 years ago

0.2.37

6 years ago

0.2.36

6 years ago

0.2.35

6 years ago

0.2.34

6 years ago

0.2.33

6 years ago

0.2.32

6 years ago

0.2.31

6 years ago

0.2.30

6 years ago

0.2.29

6 years ago

0.2.28

6 years ago

0.2.27

6 years ago

0.2.26

6 years ago

0.2.25

6 years ago

0.2.24

6 years ago

0.2.23

6 years ago

0.2.22

6 years ago

0.2.21

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.4

6 years ago

0.1.2

6 years ago

0.1.0

6 years ago