https://github.com/bakerface/fnss
Extensible functional stylesheets for React and React-Native
https://github.com/bakerface/fnss
Last synced: 7 months ago
JSON representation
Extensible functional stylesheets for React and React-Native
- Host: GitHub
- URL: https://github.com/bakerface/fnss
- Owner: bakerface
- License: mit
- Created: 2017-06-25T12:49:55.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-09T15:21:25.000Z (almost 9 years ago)
- Last Synced: 2025-10-01T14:20:42.414Z (7 months ago)
- Language: JavaScript
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fnss
[](http://badge.fury.io/js/fnss)
[](https://www.npmjs.com/package/fnss)
This package is used to provide extensible, functional styling to your React and React Native applications. This package is unopinionated and makes no assumptions about your application. Below is a simple example:
``` javascript
import React from 'react';
import { Text } from 'react-native';
import * as StyleSheet from 'fnss';
const StyleableText = StyleSheet.wrap(Text);
const primary = ({ primary = 'black' }) => primary;
const rem = (n = 1) => ({ rem = 16 }) => n * rem;
const styles = StyleSheet.create({
text: {
color: primary,
fontSize: rem(2)
}
});
export default class App extends React.Component {
render() {
return (
Hello world
);
}
}
```