{"id":16807738,"url":"https://github.com/lfscamargo/styled-toolset","last_synced_at":"2025-08-06T11:19:00.859Z","repository":{"id":96705567,"uuid":"339619305","full_name":"LFSCamargo/styled-toolset","owner":"LFSCamargo","description":"styled-components toolset to reduce duplicity","archived":false,"fork":false,"pushed_at":"2021-02-17T23:29:35.000Z","size":119,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-01T05:41:11.013Z","etag":null,"topics":["react","styled-components","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/styled-toolset","language":"TypeScript","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/LFSCamargo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-17T05:19:05.000Z","updated_at":"2023-09-08T18:18:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfba70a8-84e1-4aa0-b3dd-47f9ed1ac258","html_url":"https://github.com/LFSCamargo/styled-toolset","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/LFSCamargo/styled-toolset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LFSCamargo%2Fstyled-toolset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LFSCamargo%2Fstyled-toolset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LFSCamargo%2Fstyled-toolset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LFSCamargo%2Fstyled-toolset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LFSCamargo","download_url":"https://codeload.github.com/LFSCamargo/styled-toolset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LFSCamargo%2Fstyled-toolset/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269068323,"owners_count":24354477,"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","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["react","styled-components","typescript"],"created_at":"2024-10-13T09:54:53.078Z","updated_at":"2025-08-06T11:19:00.801Z","avatar_url":"https://github.com/LFSCamargo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.styled-components.com\"\u003e\n    \u003cimg alt=\"styled-components\" src=\"https://raw.githubusercontent.com/styled-components/brand/master/styled-components.png\" height=\"150px\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eStyled Components Toolset\u003c/h1\u003e\n  \u003cstrong\u003eMade to use with styled-components\u003c/strong\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg?colorB=daa357\u0026colorA=db748e\"\u003e\n\u003c/div\u003e\n\n# Styled components toolset\n\nA cool library to reduce code duplicity inside styled-components\n\n# Motivation\n\nI saw those helpers inside a code from a friend of mine and he explained me the idea and i thinked why not implementing in a better way using better typing, functional patters using Ramda and Big.JS for safer math?\n\nHe already has a library with all of those helpers but has many more that i think that is not too helpful only for styled.\n\nThats why i created this library\n\n# Docs\n\n## Theme that is being used\n\nThats the theme that is used for all the examples\n\n```ts\nconst theme = {\n\twhite: '#fff',\n\tgrey: '#eee',\n};\n```\n\n## Get Theme\n\nGet theme gets a value from the theme object\n\n```ts\nimport { getTheme } from 'styled-toolset'\nimport styled from 'styled-components'\n\nconst white = getTheme('white')\n\nconst Wrapper = styled.div`\n  background-color: `${white}`\n`;\n```\n\n## Get Property\n\nGets a property value from props and return it\n\n```ts\nimport { getProperty } from 'styled-toolset';\nimport styled from 'styled-components';\n\nconst padding = getProperty('padding');\n\nconst Wrapper = styled.div\u003c{ padding: number }\u003e`\n\tpadding: ${padding}px;\n`;\n```\n\n## Conditional Style\n\nGets a property value and check if its true of false and select what to render\n\n### Using with plain values\n\n```ts\nimport { conditionalStyle } from 'styled-toolset'\nimport styled from 'styled-components'\n\nconst padding = conditionalStyle('disabled')\n\nconst Wrapper = styled.div\u003c{ disabled: boolean }\u003e`\n  background-color: `${conditionalStyle('#fff', '#eee')}`\n`;\n```\n\n### Using with theme variables\n\n```ts\nimport { conditionalStyle } from 'styled-toolset'\nimport styled from 'styled-components'\n\nconst padding = conditionalStyle('disabled')\nconst white = getTheme('black')\nconst grey = getTheme('grey')\n\nconst Wrapper = styled.div\u003c{ disabled: boolean }\u003e`\n  background-color: `${conditionalStyle(white, grey)}`\n`;\n```\n\n## PX to REM\n\nA converter from pixes to rem. This is a bonus!\n\n```ts\nimport { pxToRem } from 'styled-toolset'\nimport styled from 'styled-components'\n\nconst Wrapper = styled.div`\n  background-color: `${pxToRem(10)}`\n`;\n```\n\n# Contributing\n\nTo contribute simply open a fork of this repo make the changes and open a pull request of your fork following our templates and passing the github actions workflows and also bumping to the latest version\n\n## Releasing\n\nTo release a new version you need to bump the version of the project by incrementing the verision of the package.json and adding a new tag with the version bumped and the github actions wil handle the release\n\n# Honorable Mentions\n\n\u003ca href=\"https://github.com/ammichael\"\u003e\n  \u003cimg src=\"https://avatars.githubusercontent.com/u/6873880?s=120\u0026v=4\" style=\"border-radius: 50%;\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfscamargo%2Fstyled-toolset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfscamargo%2Fstyled-toolset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfscamargo%2Fstyled-toolset/lists"}