{"id":22511555,"url":"https://github.com/codepunkt/fela-react-prop","last_synced_at":"2025-08-19T00:17:45.224Z","repository":{"id":57234339,"uuid":"89937527","full_name":"codepunkt/fela-react-prop","owner":"codepunkt","description":"Generate class names for fela style rule and apply them as property on a wrapped component","archived":false,"fork":false,"pushed_at":"2017-05-03T09:10:20.000Z","size":34,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T20:07:44.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codepunkt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-01T15:46:50.000Z","updated_at":"2017-11-10T23:56:08.000Z","dependencies_parsed_at":"2022-09-12T09:32:00.470Z","dependency_job_id":null,"html_url":"https://github.com/codepunkt/fela-react-prop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepunkt%2Ffela-react-prop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepunkt%2Ffela-react-prop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepunkt%2Ffela-react-prop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepunkt%2Ffela-react-prop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codepunkt","download_url":"https://codeload.github.com/codepunkt/fela-react-prop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228548560,"owners_count":17935226,"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-12-07T02:13:14.238Z","updated_at":"2024-12-07T02:13:14.817Z","avatar_url":"https://github.com/codepunkt.png","language":"JavaScript","readme":"# fela-react-prop\n[![npm version](https://badge.fury.io/js/fela-react-prop.svg)](https://badge.fury.io/js/fela-react-prop) [![Build Status](https://travis-ci.org/codepunkt/fela-react-prop.svg?branch=master)](https://travis-ci.org/codepunkt/fela-react-prop) [![Coverage Status](https://coveralls.io/repos/github/codepunkt/fela-react-prop/badge.svg?branch=master)](https://coveralls.io/github/codepunkt/fela-react-prop?branch=master)\n\nA HOC allowing you to specify which property to bind [`fela`](https://github.com/rofrischmann/fela) generated class names against (i.e. something other than `className`).\n\n## Installation\n```bash\nyarn add fela-react-prop\n```\n\n## Usage\n```javascript\nimport React from 'react'\nimport { addPropertyStyles } from 'fela-react-prop'\n\n// apply the style classes generated for a style rule to the \"propName\"\n// property of the wrapped component (WrappedComponent).\nconst StyledLink = addPropertyStyles('propName', props =\u003e ({\n  display: 'block',\n}), WrappedComponent)\n```\n## Use Cases\n\n### react-router `Link`\n\nSet default and active styles of `Link` component from [`react-router`](https://github.com/ReactTraining/react-router).\n\n```javascript\nimport { NavLink } from 'react-router-dom'\nimport { addPropertyStyles } from 'fela-react-prop'\n\n// apply the style classes generated for a style rule to the \"activeClassName\"\n// property of the wrapped component (NavLink).\nconst StyledLink = addPropertyStyles('activeClassName', () =\u003e ({\n  color: '#bada55',\n}), NavLink)`\n```\n\n### react-sticky `Sticky`\n\nSet default and sticky styles of `Sticky` component from [`react-sticky`](https://github.com/captivationsoftware/react-sticky).\n\n```javascript\nimport { Sticky } from 'react-sticky'\nimport { addPropertyStyles } from 'fela-react-prop'\n\n// apply the style classes generated for a style rule to the \"stickyClassName\"\n// property of the wrapped component (Sticky).\nconst StyledLink = addPropertyStyles('stickyClassName', () =\u003e ({\n  marginTop: '16px',\n}), Sticky)`\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodepunkt%2Ffela-react-prop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodepunkt%2Ffela-react-prop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodepunkt%2Ffela-react-prop/lists"}