Sha256: f594fa95f66ae09071d2c992c88c295ecbb8531773043eb0c3ce6c50460b83f7

Contents?: true

Size: 799 Bytes

Versions: 31

Compression:

Stored size: 799 Bytes

Contents

import * as React from "react";
import assetUrl from "../support/asset_url";

interface IconProps {
  name: string;
  iconExtraClassName?: string;
}

export const Icon: React.SFC<IconProps> = ({ name, iconExtraClassName }) => {
  return (
    <svg className={`icon ${iconExtraClassName} ${name}`}>
      <use
        xmlnsXlink="http://www.w3.org/1999/xlink"
        xlinkHref={`${assetUrl("icons.svg")}#${name}`}
      />
    </svg>
  );
};

Icon.defaultProps = {
  iconExtraClassName: "icon--before"
};

interface IconWithoutUserAgentProps {
  name: string;
  iconExtraClassName?: string;
}

const IconWithoutUserAgent: React.SFC<IconWithoutUserAgentProps> = ({
  name,
  iconExtraClassName
}) => <Icon name={name} iconExtraClassName={iconExtraClassName} />;

export default IconWithoutUserAgent;

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-comments-0.21.0 app/frontend/application/icon.component.tsx
decidim-comments-0.20.1 app/frontend/application/icon.component.tsx
decidim-comments-0.20.0 app/frontend/application/icon.component.tsx
decidim-comments-0.19.1 app/frontend/application/icon.component.tsx
decidim-comments-0.18.1 app/frontend/application/icon.component.tsx
decidim-comments-0.19.0 app/frontend/application/icon.component.tsx
decidim-comments-0.17.2 app/frontend/application/icon.component.tsx
decidim-comments-0.18.0 app/frontend/application/icon.component.tsx
decidim-comments-0.17.1 app/frontend/application/icon.component.tsx
decidim-comments-0.16.1 app/frontend/application/icon.component.tsx
decidim-comments-0.17.0 app/frontend/application/icon.component.tsx
decidim-comments-0.16.0 app/frontend/application/icon.component.tsx
decidim-comments-0.15.2 app/frontend/application/icon.component.tsx
decidim-comments-0.15.1 app/frontend/application/icon.component.tsx
decidim-comments-0.15.0 app/frontend/application/icon.component.tsx
decidim-comments-0.14.4 app/frontend/application/icon.component.tsx
decidim-comments-0.14.3 app/frontend/application/icon.component.tsx
decidim-comments-0.14.2 app/frontend/application/icon.component.tsx
decidim-comments-0.14.1 app/frontend/application/icon.component.tsx
decidim-comments-0.13.1 app/frontend/application/icon.component.tsx