{"id":20995104,"url":"https://github.com/blackboxvision/react-native-paper-use-styles","last_synced_at":"2025-07-01T14:06:23.680Z","repository":{"id":45294394,"uuid":"288711695","full_name":"BlackBoxVision/react-native-paper-use-styles","owner":"BlackBoxVision","description":"Custom Hook to define RN StyleSheets in a dynamic way","archived":false,"fork":false,"pushed_at":"2021-12-23T15:21:31.000Z","size":486,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-26T04:01:33.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlackBoxVision.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-19T11:19:18.000Z","updated_at":"2022-09-18T12:24:39.000Z","dependencies_parsed_at":"2022-09-14T17:11:22.931Z","dependency_job_id":null,"html_url":"https://github.com/BlackBoxVision/react-native-paper-use-styles","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/BlackBoxVision/react-native-paper-use-styles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBoxVision%2Freact-native-paper-use-styles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBoxVision%2Freact-native-paper-use-styles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBoxVision%2Freact-native-paper-use-styles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBoxVision%2Freact-native-paper-use-styles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlackBoxVision","download_url":"https://codeload.github.com/BlackBoxVision/react-native-paper-use-styles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBoxVision%2Freact-native-paper-use-styles/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262978564,"owners_count":23394008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T07:21:40.273Z","updated_at":"2025-07-01T14:06:23.658Z","avatar_url":"https://github.com/BlackBoxVision.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RN Paper makeStyles Hook [![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n\nCustom Hook to define RN StyleSheets in a dynamic way.\n\n## Table of contents\n\n- [Use Case](#use-case)\n- [Compatibility](#compatibility)\n- [Pre Requisites](#pre-requisites)\n- [Installation](#installation)\n  - [NPM](#npm)\n  - [YARN](#yarn)\n- [Example Usage](#example-usage)\n- [Issues](#issues)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Use case\n\nYou're using RN for building an app, and you need to make custom styles based on theme and props.\n\n## Compatibility\n\nOur package currently supports apps with **RN \u003e= 0.60**. `We don't have a plan currently to support olders ones, but if you need we're open to support it.`\n\n## Pre Requisites\n\nYou're using `react-native-paper` components in your app.\n\n## Installation\n\nYou can install this library via NPM or YARN.\n\n### NPM\n\n```bash\nnpm i @blackbox-vision/react-native-paper-use-styles\n```\n\n### YARN\n\n```bash\nyarn add @blackbox-vision/react-native-paper-use-styles\n```\n\n## Example Usage\n\nAfter reading and performing the previous steps, you should be able to import the library and use it like in this example:\n\n```javascript\n// MyComponent.js\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { useStyles } from './styles';\n\nconst deviceWidth = Dimensions.get('screen').width;\nconst deviceHeight = Dimensions.get('screen').height;\n\nconst MyComponent = (props) =\u003e {\n  const styles = useStyles({\n    deviceWidth,\n    deviceHeight,\n  });\n\n  return \u003cView style={styles.container}\u003e .... \u003c/View\u003e;\n};\n\nexport default MyComponent;\n```\n\n```javascript\n// styles.ts\n\nexport const useStyles = makeStyles((theme, props) =\u003e ({\n  container: {\n    backgroundColor: theme.colors.backgroundColor,\n    height: props.deviceHeight,\n    width: props.deviceWidth,\n  },\n}));\n```\n\n## Issues\n\nPlease, open an [issue](https://github.com/BlackBoxVision/react-native-paper-use-styles/issues) following one of the issues templates. We will do our best to fix them.\n\n## Contributing\n\nIf you want to contribute to this project see [contributing](https://github.com/BlackBoxVision/react-native-paper-use-styles/blob/master/CONTRIBUTING.md) for more information.\n\n## License\n\nDistributed under the **MIT license**. See [LICENSE](https://github.com/BlackBoxVision/react-native-paper-use-styles/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackboxvision%2Freact-native-paper-use-styles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackboxvision%2Freact-native-paper-use-styles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackboxvision%2Freact-native-paper-use-styles/lists"}