Skip to content

Commit

Permalink
💥 breaking: remove "Icon" suffix from icon component name
Browse files Browse the repository at this point in the history
  • Loading branch information
xandemon committed Nov 9, 2024
1 parent 0194398 commit 7b42435
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './AdobeXDIcon.tsx';export * from './AnthropicIcon.tsx';export * from './AnthropicBasicLightIcon.tsx';export * from './AnthropicBasicDarkIcon.tsx';export * from './ClaudeAIIcon.tsx';export * from './ApacheIcon.tsx';export * from './AppwriteIcon.tsx';export * from './ARCIcon.tsx';export * from './AstroIcon.tsx';export * from './AtlassianIcon.tsx';export * from './AtomIcon.tsx';export * from './Auth0Icon.tsx';export * from './AVAIcon.tsx';export * from './AWSIcon.tsx';export * from './AxiomIcon.tsx';export * from './AxureIcon.tsx';export * from './AzureIcon.tsx';export * from './BabelIcon.tsx';export * from './BackboneJsIcon.tsx';export * from './BashIcon.tsx';export * from './BingIcon.tsx';export * from './BitbucketIcon.tsx';export * from './BitnamiIcon.tsx';export * from './BlueprintJsIcon.tsx';export * from './Bootstrap4Icon.tsx';export * from './Bootstrap5Icon.tsx';export * from './BraveIcon.tsx';export * from './BulmaUIIcon.tsx';export * from './BunJsIcon.tsx';export * from './CIcon.tsx';export * from './CSharpIcon.tsx';export * from './CPlusPlusIcon.tsx';export * from './CakePHPIcon.tsx';export * from './CanvaIcon.tsx';export * from './CassandraDBIcon.tsx';export * from './ChakraUIIcon.tsx';export * from './ChatGPTIcon.tsx';export * from './ChromeIcon.tsx';export * from './ChromiumIcon.tsx';export * from './CircleCIIcon.tsx';export * from './ClickHouseIcon.tsx';export * from './ClojureIcon.tsx';export * from './CloudflareIcon.tsx';export * from './CloudinaryIcon.tsx';export * from './CodefreshIcon.tsx';export * from './CodeIgniterIcon.tsx';export * from './CopilotIcon.tsx';export * from './CrystalIcon.tsx';export * from './CSS3Icon.tsx';export * from './CypressIcon.tsx';export * from './DLanguageIcon.tsx';export * from './DartIcon.tsx';export * from './DatadogIcon.tsx';export * from './DenoIcon.tsx';export * from './DeveloperIconsIcon.tsx';export * from './DigitalOceanIcon.tsx';export * from './DiscordIcon.tsx';export * from './DjangoIcon.tsx';export * from './DockerIcon.tsx';export * from './DocusaurusIcon.tsx';export * from './DovetailIcon.tsx';export * from './EC2Icon.tsx';export * from './EdgeIcon.tsx';export * from './ElasticIcon.tsx';export * from './ElectronIcon.tsx';export * from './ElementUIIcon.tsx';export * from './ElixirIcon.tsx';export * from './EmberIcon.tsx';export * from './ErlangIcon.tsx';export * from './EsbuildIcon.tsx';export * from './ESLintIcon.tsx';export * from './ExpressJsDarkIcon.tsx';export * from './ExpressJsLightIcon.tsx';export * from './FacebookIcon.tsx';export * from './FaunaDBIcon.tsx';export * from './FigmaIcon.tsx';export * from './FirebaseIcon.tsx';export * from './FirefoxIcon.tsx';export * from './FlaskDarkIcon.tsx';export * from './FlaskLightIcon.tsx';export * from './FlutterIcon.tsx';export * from './FlyIoIcon.tsx';export * from './FramerIcon.tsx';export * from './GatsbyIcon.tsx';export * from './GitIcon.tsx';export * from './GitHubDarkIcon.tsx';export * from './GitHubLightIcon.tsx';export * from './GitHubCopilotIcon.tsx';export * from './GitLabIcon.tsx';export * from './GmailIcon.tsx';export * from './GoIcon.tsx';export * from './GoogleIcon.tsx';export * from './GoogleCloudIcon.tsx';export * from './GoogleWordmark.tsx';export * from './GrafanaIcon.tsx';export * from './GrafbaseIcon.tsx';export * from './GraphiteIcon.tsx';export * from './GraphQLIcon.tsx';export * from './GridsomeIcon.tsx';export * from './GruntJsIcon.tsx';export * from './GulpIcon.tsx';export * from './HashnodeIcon.tsx';export * from './HaskellIcon.tsx';export * from './HeadlessUIIcon.tsx';export * from './HerokuIcon.tsx';export * from './HexoIcon.tsx';export * from './HHVMIcon.tsx';export * from './HomebrewIcon.tsx';export * from './HotjarIcon.tsx';export * from './HTML5Icon.tsx';export * from './Hyper2Icon.tsx';export * from './I18nextIcon.tsx';export * from './InDesignIcon.tsx';export * from './InsomniaIcon.tsx';export * from './InstagramIcon.tsx';export * from './InternetExplorerIcon.tsx';export * from './InVisionIcon.tsx';export * from './IonicIcon.tsx';export * from './JAMstackIcon.tsx';export * from './JavaIcon.tsx';export * from './JavaScriptIcon.tsx';export * from './JestIcon.tsx';export * from './JiraIcon.tsx';export * from './JQueryIcon.tsx';export * from './JSLintIcon.tsx';export * from './JSONIcon.tsx';export * from './KibanaIcon.tsx';export * from './KotlinIcon.tsx';export * from './KubernetesIcon.tsx';export * from './LaravelIcon.tsx';export * from './LessIcon.tsx';export * from './LightroomIcon.tsx';export * from './LinkedInIcon.tsx';export * from './LinuxIcon.tsx';export * from './LitIcon.tsx';export * from './LiveblocksIcon.tsx';export * from './LogRocketIcon.tsx';export * from './LokaliseIcon.tsx';export * from './LuaIcon.tsx';export * from './LunacyIcon.tsx';export * from './MariaDBIcon.tsx';export * from './MarionetteIcon.tsx';export * from './MarkdownIcon.tsx';export * from './MastodonIcon.tsx';export * from './MaterialUIIcon.tsx';export * from './MessengerIcon.tsx';export * from './MetaIcon.tsx';export * from './MicrosoftIcon.tsx';export * from './MicrosoftSQLServerIcon.tsx';export * from './MiroIcon.tsx';export * from './MochaJSIcon.tsx';export * from './MongoDBIcon.tsx';export * from './MozillaIcon.tsx';export * from './MySQLIcon.tsx';export * from './NeoVimIcon.tsx';export * from './NestJSIcon.tsx';export * from './NetlifyIcon.tsx';export * from './Netlify2Icon.tsx';export * from './NextJsIcon.tsx';export * from './NextJsWordmark.tsx';export * from './NimIcon.tsx';export * from './NodeJsIcon.tsx';export * from './NotionIcon.tsx';export * from './NPMIcon.tsx';export * from './NPMWordmark.tsx';export * from './NuxtJsIcon.tsx';export * from './OCamlIcon.tsx';export * from './OneDriveIcon.tsx';export * from './OpenAIIcon.tsx';export * from './OperaIcon.tsx';export * from './OracleIcon.tsx';export * from './PandaCSSIcon.tsx';export * from './PhotoshopIcon.tsx';export * from './PHPIcon.tsx';export * from './PiniaIcon.tsx';export * from './PinterestIcon.tsx';export * from './PixiJSIcon.tsx';export * from './PlaywrightIcon.tsx';export * from './PostgreSQLIcon.tsx';export * from './PostmanIcon.tsx';export * from './PowerShellIcon.tsx';export * from './PreactIcon.tsx';export * from './PrestoIcon.tsx';export * from './PrettierIcon.tsx';export * from './PrismaIcon.tsx';export * from './PugJsIcon.tsx';export * from './PWAIcon.tsx';export * from './PythonIcon.tsx';export * from './PyTorchIcon.tsx';export * from './PyTorch3DIcon.tsx';export * from './QwikIcon.tsx';export * from './RadixUIIcon.tsx';export * from './RailsIcon.tsx';export * from './RailwayIcon.tsx';export * from './ReactIcon.tsx';export * from './ReactQueryIcon.tsx';export * from './ReactRouterIcon.tsx';export * from './RedHatIcon.tsx';export * from './RedditIcon.tsx';export * from './RedditWordmark.tsx';export * from './RedisIcon.tsx';export * from './ReduxIcon.tsx';export * from './ReduxSagaIcon.tsx';export * from './RenderIcon.tsx';export * from './ReSendIcon.tsx';export * from './RollupIcon.tsx';export * from './RubyIcon.tsx';export * from './RustDarkIcon.tsx';export * from './RustLightIcon.tsx';export * from './SafariIcon.tsx';export * from './SassIcon.tsx';export * from './ScalaIcon.tsx';export * from './SemanticUIIcon.tsx';export * from './ServerlessIcon.tsx';export * from './ShadcnUIIcon.tsx';export * from './SketchIcon.tsx';export * from './Sketch2Icon.tsx';export * from './SkypeIcon.tsx';export * from './SlackIcon.tsx';export * from './SolidityIcon.tsx';export * from './SolidJSIcon.tsx';export * from './SpringIcon.tsx';export * from './StoryblokIcon.tsx';export * from './StorybookIcon.tsx';export * from './StreamIcon.tsx';export * from './StylelintIcon.tsx';export * from './SublimeIcon.tsx';export * from './SupabaseIcon.tsx';export * from './SvelteJSIcon.tsx';export * from './SwaggerIcon.tsx';export * from './SwiftIcon.tsx';export * from './TailwindCSSIcon.tsx';export * from './TelegramIcon.tsx';export * from './TensorflowIcon.tsx';export * from './ThreadsDarkIcon.tsx';export * from './ThreadsLightIcon.tsx';export * from './ThreeJsIcon.tsx';export * from './TikTokIcon.tsx';export * from './TinyHTTPIcon.tsx';export * from './TorIcon.tsx';export * from './TRPCIcon.tsx';export * from './TwitterIcon.tsx';export * from './TypeScriptIcon.tsx';export * from './UbuntuIcon.tsx';export * from './UnJsIcon.tsx';export * from './UpworkIcon.tsx';export * from './UpworkBasicIcon.tsx';export * from './UpworkWordmark.tsx';export * from './VercelDarkWordmark.tsx';export * from './VercelDarkIcon.tsx';export * from './VercelLightWordmark.tsx';export * from './VercelLightIcon.tsx';export * from './VimIcon.tsx';export * from './VisualBasicIcon.tsx';export * from './VisualStudioCodeIcon.tsx';export * from './ViteJSIcon.tsx';export * from './VitestIcon.tsx';export * from './VivaldiIcon.tsx';export * from './VKIcon.tsx';export * from './VueJsIcon.tsx';export * from './WebAssemblyIcon.tsx';export * from './WebpackIcon.tsx';export * from './WhatsAppIcon.tsx';export * from './WordPressIcon.tsx';export * from './XDarkIcon.tsx';export * from './XLightIcon.tsx';export * from './XamarinIcon.tsx';export * from './YogaIcon.tsx';export * from './YouTubeIcon.tsx';export * from './YouTubeWordmark.tsx';export * from './ZenIcon.tsx';export * from './ZodIcon.tsx';
export * from './AdobeXD.tsx';export * from './Anthropic.tsx';export * from './AnthropicBasicLight.tsx';export * from './AnthropicBasicDark.tsx';export * from './ClaudeAI.tsx';export * from './Apache.tsx';export * from './Appwrite.tsx';export * from './ARC.tsx';export * from './Astro.tsx';export * from './Atlassian.tsx';export * from './Atom.tsx';export * from './Auth0.tsx';export * from './AVA.tsx';export * from './AWS.tsx';export * from './Axiom.tsx';export * from './Axure.tsx';export * from './Azure.tsx';export * from './Babel.tsx';export * from './BackboneJs.tsx';export * from './Bash.tsx';export * from './Bing.tsx';export * from './Bitbucket.tsx';export * from './Bitnami.tsx';export * from './BlueprintJs.tsx';export * from './Bootstrap4.tsx';export * from './Bootstrap5.tsx';export * from './Brave.tsx';export * from './BulmaUI.tsx';export * from './BunJs.tsx';export * from './C.tsx';export * from './CSharp.tsx';export * from './CPlusPlus.tsx';export * from './CakePHP.tsx';export * from './Canva.tsx';export * from './CassandraDB.tsx';export * from './ChakraUI.tsx';export * from './ChatGPT.tsx';export * from './Chrome.tsx';export * from './Chromium.tsx';export * from './CircleCI.tsx';export * from './ClickHouse.tsx';export * from './Clojure.tsx';export * from './Cloudflare.tsx';export * from './Cloudinary.tsx';export * from './Codefresh.tsx';export * from './CodeIgniter.tsx';export * from './Copilot.tsx';export * from './Crystal.tsx';export * from './CSS3.tsx';export * from './Cypress.tsx';export * from './DLanguage.tsx';export * from './Dart.tsx';export * from './Datadog.tsx';export * from './Deno.tsx';export * from './DeveloperIcons.tsx';export * from './DigitalOcean.tsx';export * from './Discord.tsx';export * from './Django.tsx';export * from './Docker.tsx';export * from './Docusaurus.tsx';export * from './Dovetail.tsx';export * from './EC2.tsx';export * from './Edge.tsx';export * from './Elastic.tsx';export * from './Electron.tsx';export * from './ElementUI.tsx';export * from './Elixir.tsx';export * from './Ember.tsx';export * from './Erlang.tsx';export * from './Esbuild.tsx';export * from './ESLint.tsx';export * from './ExpressJsDark.tsx';export * from './ExpressJsLight.tsx';export * from './Facebook.tsx';export * from './FaunaDB.tsx';export * from './Figma.tsx';export * from './Firebase.tsx';export * from './Firefox.tsx';export * from './FlaskDark.tsx';export * from './FlaskLight.tsx';export * from './Flutter.tsx';export * from './FlyIo.tsx';export * from './Framer.tsx';export * from './Gatsby.tsx';export * from './Git.tsx';export * from './GitHubDark.tsx';export * from './GitHubLight.tsx';export * from './GitHubCopilot.tsx';export * from './GitLab.tsx';export * from './Gmail.tsx';export * from './Go.tsx';export * from './Google.tsx';export * from './GoogleCloud.tsx';export * from './GoogleWordmark.tsx';export * from './Grafana.tsx';export * from './Grafbase.tsx';export * from './Graphite.tsx';export * from './GraphQL.tsx';export * from './Gridsome.tsx';export * from './GruntJs.tsx';export * from './Gulp.tsx';export * from './Hashnode.tsx';export * from './Haskell.tsx';export * from './HeadlessUI.tsx';export * from './Heroku.tsx';export * from './Hexo.tsx';export * from './HHVM.tsx';export * from './Homebrew.tsx';export * from './Hotjar.tsx';export * from './HTML5.tsx';export * from './Hyper2.tsx';export * from './I18next.tsx';export * from './InDesign.tsx';export * from './Insomnia.tsx';export * from './Instagram.tsx';export * from './InternetExplorer.tsx';export * from './InVision.tsx';export * from './Ionic.tsx';export * from './JAMstack.tsx';export * from './Java.tsx';export * from './JavaScript.tsx';export * from './Jest.tsx';export * from './Jira.tsx';export * from './JQuery.tsx';export * from './JSLint.tsx';export * from './JSON.tsx';export * from './Kibana.tsx';export * from './Kotlin.tsx';export * from './Kubernetes.tsx';export * from './Laravel.tsx';export * from './Less.tsx';export * from './Lightroom.tsx';export * from './LinkedIn.tsx';export * from './Linux.tsx';export * from './Lit.tsx';export * from './Liveblocks.tsx';export * from './LogRocket.tsx';export * from './Lokalise.tsx';export * from './Lua.tsx';export * from './Lunacy.tsx';export * from './MariaDB.tsx';export * from './Marionette.tsx';export * from './Markdown.tsx';export * from './Mastodon.tsx';export * from './MaterialUI.tsx';export * from './Messenger.tsx';export * from './Meta.tsx';export * from './Microsoft.tsx';export * from './MicrosoftSQLServer.tsx';export * from './Miro.tsx';export * from './MochaJS.tsx';export * from './MongoDB.tsx';export * from './Mozilla.tsx';export * from './MySQL.tsx';export * from './NeoVim.tsx';export * from './NestJS.tsx';export * from './Netlify.tsx';export * from './Netlify2.tsx';export * from './NextJs.tsx';export * from './NextJsWordmark.tsx';export * from './Nim.tsx';export * from './NodeJs.tsx';export * from './Notion.tsx';export * from './NPM.tsx';export * from './NPMWordmark.tsx';export * from './NuxtJs.tsx';export * from './OCaml.tsx';export * from './OneDrive.tsx';export * from './OpenAI.tsx';export * from './Opera.tsx';export * from './Oracle.tsx';export * from './PandaCSS.tsx';export * from './Photoshop.tsx';export * from './PHP.tsx';export * from './Pinia.tsx';export * from './Pinterest.tsx';export * from './PixiJS.tsx';export * from './Playwright.tsx';export * from './PostgreSQL.tsx';export * from './Postman.tsx';export * from './PowerShell.tsx';export * from './Preact.tsx';export * from './Presto.tsx';export * from './Prettier.tsx';export * from './Prisma.tsx';export * from './PugJs.tsx';export * from './PWA.tsx';export * from './Python.tsx';export * from './PyTorch.tsx';export * from './PyTorch3D.tsx';export * from './Qwik.tsx';export * from './RadixUI.tsx';export * from './Rails.tsx';export * from './Railway.tsx';export * from './React.tsx';export * from './ReactQuery.tsx';export * from './ReactRouter.tsx';export * from './RedHat.tsx';export * from './Reddit.tsx';export * from './RedditWordmark.tsx';export * from './Redis.tsx';export * from './Redux.tsx';export * from './ReduxSaga.tsx';export * from './Render.tsx';export * from './ReSend.tsx';export * from './Rollup.tsx';export * from './Ruby.tsx';export * from './RustDark.tsx';export * from './RustLight.tsx';export * from './Safari.tsx';export * from './Sass.tsx';export * from './Scala.tsx';export * from './SemanticUI.tsx';export * from './Serverless.tsx';export * from './ShadcnUI.tsx';export * from './Sketch.tsx';export * from './Sketch2.tsx';export * from './Skype.tsx';export * from './Slack.tsx';export * from './Solidity.tsx';export * from './SolidJS.tsx';export * from './Spring.tsx';export * from './Storyblok.tsx';export * from './Storybook.tsx';export * from './Stream.tsx';export * from './Stylelint.tsx';export * from './Sublime.tsx';export * from './Supabase.tsx';export * from './SvelteJS.tsx';export * from './Swagger.tsx';export * from './Swift.tsx';export * from './TailwindCSS.tsx';export * from './Telegram.tsx';export * from './Tensorflow.tsx';export * from './ThreadsDark.tsx';export * from './ThreadsLight.tsx';export * from './ThreeJs.tsx';export * from './TikTok.tsx';export * from './TinyHTTP.tsx';export * from './Tor.tsx';export * from './TRPC.tsx';export * from './Twitter.tsx';export * from './TypeScript.tsx';export * from './Ubuntu.tsx';export * from './UnJs.tsx';export * from './Upwork.tsx';export * from './UpworkBasic.tsx';export * from './UpworkWordmark.tsx';export * from './VercelDarkWordmark.tsx';export * from './VercelDark.tsx';export * from './VercelLightWordmark.tsx';export * from './VercelLight.tsx';export * from './Vim.tsx';export * from './VisualBasic.tsx';export * from './VisualStudioCode.tsx';export * from './ViteJS.tsx';export * from './Vitest.tsx';export * from './Vivaldi.tsx';export * from './VK.tsx';export * from './VueJs.tsx';export * from './WebAssembly.tsx';export * from './Webpack.tsx';export * from './WhatsApp.tsx';export * from './WordPress.tsx';export * from './XDark.tsx';export * from './XLight.tsx';export * from './Xamarin.tsx';export * from './Yoga.tsx';export * from './YouTube.tsx';export * from './YouTubeWordmark.tsx';export * from './Zen.tsx';export * from './Zod.tsx';
7 changes: 2 additions & 5 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ export const mergeClassNames = (defaultClass: string, className?: string) =>
`${defaultClass} ${className ?? ""}`;

export const generateIconCompName = (initialName: string) => {
const rawIconName = initialName
const iconName = initialName
.replace(/#/g, "-sharp")
.replace(/\+/g, "-plus")
.split(/[-. ]+/)
.map((item) => capitalizeFirstletter(item))
.join("");
const iconCompName = rawIconName.includes("Wordmark")
? rawIconName
: `${rawIconName}Icon`;
return iconCompName as keyof typeof DI;
return iconName as keyof typeof DI;
};
22 changes: 10 additions & 12 deletions playground/App.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
import "./App.css";
import {
InstagramIcon,
ReactIcon,
DeveloperIconsIcon,
CIcon,
GitHubDarkIcon,
ZenIcon,
Instagram,
DeveloperIcons,
GitHubDark,
Zen,
NextJsWordmark,
} from "../dist/main";

function App() {
return (
<>
<div style={{ display: "flex", alignItems: "center", gap: 30 }}>
<ReactIcon size={150} />
<InstagramIcon size={150} />
<DeveloperIconsIcon size={150} />
<CIcon size={150} />
<ZenIcon size={150} />
<GitHubDarkIcon size={150} />
<NextJsWordmark size={150} />
<Instagram size={150} />
<DeveloperIcons size={150} />
<Zen size={150} />
<GitHubDark size={150} />
</div>
<h1>Developer-Icons Playground</h1>
<div className="card">
Expand Down

0 comments on commit 7b42435

Please sign in to comment.