Skip to content

TobiasKoehler/fiori-for-react

 
 

Repository files navigation

fiori-for-react

Build Status Code Coverage Slack Badge code style: prettier lerna

Table of Contents

  1. Description
  2. Requirements
  3. Download & Installation
  4. Configuration
  5. Known Issues
  6. Support
  7. Contributing
  8. License

Description

fiori-for-react is providing a Fiori-compliant React implementation by leveraging the UI5 Web Components.

Explore our components

You can play around with our components by visiting our Storybook.

Package Overview

@fiori-for-react/fiori3 - Fiori 3 Components

https://www.npmjs.com/package/@fiori-for-react/fiori3 https://bundlephobia.com/result?p=@fiori-for-react/fiori3 https://bundlephobia.com/result?p=@fiori-for-react/fiori3

https://www.npmjs.com/package/@fiori-for-react/styles https://bundlephobia.com/result?p=@fiori-for-react/styles https://bundlephobia.com/result?p=@fiori-for-react/styles

https://www.npmjs.com/package/@fiori-for-react/utils https://bundlephobia.com/result?p=@fiori-for-react/utils https://bundlephobia.com/result?p=@fiori-for-react/utils

https://www.npmjs.com/package/@fiori-for-react/charts https://bundlephobia.com/result?p=@fiori-for-react/charts https://bundlephobia.com/result?p=@fiori-for-react/charts

Requirements

Download and Installation

To consume fiori-for-react, first you need to install the npm module:

npm install @fiori-for-react/fiori3 --save

Configuration

Prerequisite: You have a React app. In case you don't, we recommend to create one using create-react-app.
In order to use fiori-for-react you have to wrap your application's root component into the ThemeProvider.
You will find this component most likely in src/App.js:

import { ContentDensity, ThemeProvider, Themes } from '@fiori-for-react/fiori3';
...
render() {
  return (
    <div>
      <ThemeProvider theme={Themes.sap_fiori_3} contentDensity={ContentDensity.Compact} withToastContainer>
        <MyApp />
      </ThemeProvider>
    </div>
  );
}

Then, you are ready to use fiori-for-react and you can import the desired component(s) in your app:
For example, to use Button you need to import it:

import { Button } from '@fiori-for-react/fiori3'; // loads ui5-button wrapped in a fiori-for-react component

Then, you can use the Button in your app:

<Button onPress={() => alert('Hello World!')}>Hello world!</Button>

Known Issues

Please look at our GitHub Issues .

Support

This project is provided "as-is": there is no guarantee that raised issues will be answered or addressed in future releases.

Contributing

Please check our Contribution Guidelines.

License

Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, Version 2.0 except as noted otherwise in the LICENSE file.

About

A Fiori 3 implementation in React, built on top of UI5 Web Components

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.6%
  • JavaScript 13.0%
  • Other 0.4%