The flame icon: a 24 by 24 stroke glyph that takes its colour from the text around it.
registry/behivetech/icons/flame · depends on @behivetech/icons.base
flame.tsx
1import { createIcon } from "@behivetech/icons.base";23/** The flame icon: a stroke glyph on a 24 by 24 grid that inherits the text colour. */4export const FlameIcon = /*#__PURE__*/ createIcon(5 "FlameIcon",6 <>7 <path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.07-2.14-.22-4.05 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.15.43-2.29 1-3a2.5 2.5 0 0 0 2.5 2.5z" />8 </>,9);1011export default FlameIcon;
index.ts
1export { FlameIcon, default } from "./flame.js";
flame.example.tsx
1import { FlameIcon } from "./flame.js";23/** The icon at each size; it takes its colour from the surrounding text. */4export const FlameIconSizes = () => (5 <>6 <FlameIcon size="sm" />7 <FlameIcon />8 <FlameIcon size="lg" />9 <FlameIcon size="xl" />10 </>11);1213/** Named with `titleAccess`, so assistive technology announces it. */14export const NamedFlameIcon = () => <FlameIcon titleAccess="Flame" />;
flame.spec.tsx
1import { render } from "@testing-library/react";2import FlameIconDefault, { FlameIcon } from "./flame.js";34describe("FlameIcon", () => {5 it("exports the same component by name and by default", () => {6 expect(FlameIconDefault).toBe(FlameIcon);7 expect(FlameIcon.displayName).toBe("FlameIcon");8 });910 it("draws its glyph and hides from assistive technology", () => {11 const { container } = render(<FlameIcon />);12 const svg = container.querySelector("svg");1314 expect(15 svg?.querySelector(16 "path, circle, rect, ellipse, line, polyline, polygon",17 ),18 ).not.toBeNull();19 expect(svg?.getAttribute("aria-hidden")).toBe("true");20 });2122 it("is an image named by titleAccess", () => {23 const { container } = render(<FlameIcon titleAccess="Flame" />);24 const svg = container.querySelector("svg");2526 expect(svg?.getAttribute("role")).toBe("img");27 expect(svg?.querySelector("title")?.textContent).toBe("Flame");28 });29});