Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Consolidate icon styles into AccessibleImage.css and SourceIcon.css #7890

Merged
merged 1 commit into from Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 4 additions & 10 deletions images/Svg.js
Expand Up @@ -7,8 +7,7 @@ import InlineSVG from "svg-inline-react";

const svg = {
breakpoint: require("./breakpoint.svg"),
"column-marker": require("./column-marker.svg"),
"magnifying-glass": require("./magnifying-glass.svg")
"column-marker": require("./column-marker.svg")
};

type SvgType = {
Expand All @@ -18,22 +17,17 @@ type SvgType = {
"aria-label"?: string
};

function Svg({ name, className, onClick, "aria-label": ariaLabel }) {
function Svg({ name, className, onClick, "aria-label": ariaLabel }: SvgType) {
if (!svg[name]) {
const error = `Unknown SVG: ${name}`;
console.warn(error);
return null;
}

className = `${name} ${className || ""}`;
if (name === "subSettings") {
className = "";
}

const props = {
className,
className: `${name} ${className || ""}`,
onClick,
["aria-label"]: ariaLabel,
"aria-label": ariaLabel,
src: svg[name]
};

Expand Down
20 changes: 0 additions & 20 deletions images/aframe.svg

This file was deleted.

10 changes: 0 additions & 10 deletions images/angular.svg

This file was deleted.

4 changes: 2 additions & 2 deletions images/arrow-down.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions images/arrow-up.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 0 additions & 107 deletions images/babel.svg

This file was deleted.

6 changes: 0 additions & 6 deletions images/backbone.svg

This file was deleted.

4 changes: 2 additions & 2 deletions images/breakpoint.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 0 additions & 60 deletions images/choo.svg

This file was deleted.

5 changes: 2 additions & 3 deletions images/close.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.