0.1.1 • Published 1 year ago

preem-ui v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

preem-ui

UI components for React Native that support custom theming.

Installation

Install the library using yarn:

yarn add preem-ui

Or npm:

npm install --save preem-ui

Setting up your theme

Next, wrap your app in a PreemThemeProvider. This allows you specify a common theme for all UI components to use.

import { PreemTheme, PreemThemeProvider } from 'preem-ui'

const theme: PreemTheme = {
  dark: true,
  colors: {
    primary: 'green',
    background: '#212121',
    card: '#2f2f2f',
    text: '#fff',
    border: '#282828',
    notification: '#ff6600',
  },
}

export default function App() {
    return (
        <PreemThemeProvider theme={theme}>
            {/* Rest of your app code */}
        <PreemThemeProvider>
    )
}

Usage with react-navigation

This library is designed to work with react-navigation. Just pass your custom PreemTheme as a prop when you create your NavigationContainer.

<NavigationContainer theme={theme}>

Components

ComponentDescription
ButtonCustom TouchableOpacity styled as a simple button.
CardView styled to look like a card.
CardListResponsive list of cards.
FabFloating action button absolutely positioned in a corner.
HeaderSimple header text to appear at the top of a screen.
InnerContainerView that is locked to a max width.
LabelStyled text to be used in combination with Inputs.
LoadingCentered loading spinner.
OuterContainerMain container for screens. Supports scrolling and accounts for status bar height.
TabBarToggle selector for a small number of items.
TableScrollable and sortable table.
TextStyled Text.
TextInputStyled TextInput.
0.1.0

1 year ago

0.1.1

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago