{"id":13725287,"url":"https://github.com/mscharley/bs-material-ui-icons","last_synced_at":"2025-05-07T19:33:39.143Z","repository":{"id":57128513,"uuid":"155858598","full_name":"mscharley/bs-material-ui-icons","owner":"mscharley","description":"ReScript bindings for material-ui-icons","archived":false,"fork":true,"pushed_at":"2021-03-09T09:02:16.000Z","size":1418,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-12T23:51:30.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"tgoins/bs-material-ui-icons","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mscharley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"mscharley","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-11-02T11:46:06.000Z","updated_at":"2021-03-09T08:59:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mscharley/bs-material-ui-icons","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscharley%2Fbs-material-ui-icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscharley%2Fbs-material-ui-icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscharley%2Fbs-material-ui-icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscharley%2Fbs-material-ui-icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mscharley","download_url":"https://codeload.github.com/mscharley/bs-material-ui-icons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224603526,"owners_count":17338961,"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-08-03T01:02:18.230Z","updated_at":"2024-11-14T15:31:04.908Z","avatar_url":"https://github.com/mscharley.png","language":"JavaScript","funding_links":["https://github.com/sponsors/mscharley"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Reason bindings for Material-UI-Icons\n\n[![npm](https://img.shields.io/npm/v/@mscharley/bs-material-ui-icons.svg)](https://www.npmjs.com/package/@mscharley/bs-material-ui-icons)\n\n[Reason](https://reasonml.github.io/) bindings for [material-ui-icons](https://github.com/callemall/material-ui).\n\n## Status\n\n🚧 This is a WIP, not everything is supported yet but we're getting close. 🚧\n\nFeel free to create an issue or PR if you find anything missing.\n\n## Installation\n\n```\nyarn add @mscharley/bs-material-ui-icons\nyarn add @material-ui/core\nyarn add @material-ui/icons\n```\n\nThen add `@mscharley/bs-material-ui-icons` to `bs-dependencies` in your `bsconfig.json`:\n\n```json\n{\n  // ...\n  \"bs-dependencies\": [\"@mscharley/bs-material-ui-icons\"]\n}\n```\n\n## Usage\n\n```reason\nlet component = ReasonReact.statelessComponent(\"Example\");\n\nlet make = (_children) =\u003e {\n  ...component,\n  render: (_self) =\u003e \u003cMscharleyBsMaterialUiIcons.Delete.Filled /\u003e\n};\n```\n\n[You can find a list of available icons here.](https://material.io/tools/icons/) The icons are exposed as `\u003cIconName.Theme /\u003e` from this library, which is slightly different to ReactJS which uses `\u003cIconNameTheme /\u003e` or `\u003cIconName /\u003e` for the filled theme.\n\n## Help! The icon I want to use isn't available\n\nMaybe this library hasn't been updated yet to include the new icon. No problems! Just open an issue and let us know we're msising something. We'll get things updated as soon as possible.\n\n## Design decisions\n\n### Why does this module take so long to build?\n\nThere are an awful lot of icons available in `@material-ui/icons`; as of writing, around 5000 of them. Initially, this project exported all of these icons from one module file. This was very fast to build! However due to interactions with the way the `bsb` builds files and the way it writes imports this led to very big deployment packages, even with tree shaking. Using a single icon caused builds to increase in size by 3MB (~7x in my small project!) because all the icons were always being included.\n\nThis module now exports each group of icons into it's own file. This leads to a slightly different usage pattern to ReactJS, namely `\u003cDelete.Filled /\u003e` instead of `\u003cDelete /\u003e` or `\u003cDelete.Outlined /\u003e` instead of `\u003cDeleteOutlined /\u003e`. This isn't that big a deal, really. It also lets packagers only include the icons you're using. Unfortunately, it means that the BSB build is a little bit longer.\n\n## Gotchas\n\n### Why can't I `include MscharleyBsMaterialUiIcons`?\n\n\u003e MscharleyBsMaterialUiIcons.js is compiled in script mode while its dependent is not\n\nRelated to the build question above, this package uses the `namespace` option in BuckleScript. This means that `MscharleyBsMaterialUiIcons` is purely synthetic and there isn't actually a script to include and re-export. Even if this did work it would be discouraged because you would end up at square one with code elimination as highlighted in the design decision above.\n\nThe current recommended way to alias this library is as follows:\n\n```reason\n/* Icons.re */\nopen MscharleyBsMaterialUiIcons;\n\nmodule PowerSettingsNew = PowerSettingsNew.Filled;\nmodule ReportProblem = ReportProblem.Filled;\nmodule Help = Help.Outlined;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmscharley%2Fbs-material-ui-icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmscharley%2Fbs-material-ui-icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmscharley%2Fbs-material-ui-icons/lists"}