Skip to content

Commit

Permalink
Add Google G logo to third party logos (#2853)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreadelrio authored Feb 24, 2020
1 parent dbdf016 commit dc12039
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Exported TS props from top level `EuiListGroupProps`, `EuiListGroupItemProps`, `EuiSelectableProps`, `EuiSelectableOption`, `EuiSelectableOptionsListProps` ([#2869](https://github.com/elastic/eui/pull/2869))
- Extending `EuiSelectable[options]` type with correct HTML element ([#2869](https://github.com/elastic/eui/pull/2869))
- Added check mark to single selection `EuiComboBox` ([#2890](https://github.com/elastic/eui/pull/2890))
- Added `logoGoogleG` third-party logo to `EuiIcon` ([#2853](https://github.com/elastic/eui/pull/2853))

**Bug fixes**

Expand Down
1 change: 1 addition & 0 deletions src-docs/src/views/icon/logos_third.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const iconTypes = [
'logoGithub',
'logoGmail',
'logoGolang',
'logoGoogleG',
'logoHAproxy',
'logoIBM',
'logoIBMMono',
Expand Down
109 changes: 109 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4326,6 +4326,115 @@ exports[`EuiIcon props type logoGolang is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type logoGoogleG is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="32"
role="img"
viewBox="0 0 32 32"
width="32"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M15.319 3.278c0-1.131-.102-2.22-.29-3.264H0v6.172h8.587c-.37 1.995-1.494 3.685-3.184 4.816v4.004h5.157c3.017-2.778 4.758-6.869 4.758-11.728z"
id="a"
/>
<path
d="M14.343 12.956c4.308 0 7.92-1.43 10.56-3.866l-5.157-4.004c-1.429.958-3.256 1.523-5.403 1.523-4.156 0-7.674-2.806-8.928-6.578H.084v4.134c2.625 5.215 8.021 8.79 14.259 8.79z"
id="c"
/>
<path
d="M7.028 10.25a9.59 9.59 0 01-.5-3.032 9.59 9.59 0 01.5-3.032V.052h-5.33A15.95 15.95 0 000 7.218c0 2.575.617 5.012 1.697 7.166l5.331-4.134z"
id="e"
/>
<path
d="M14.343 6.392c2.342 0 4.446.805 6.1 2.386l4.576-4.576C22.256 1.627 18.644.046 14.343.046 8.105.046 2.709 3.622.083 8.836l5.332 4.134c1.254-3.77 4.772-6.578 8.928-6.578z"
id="g"
/>
</defs>
<g
fill="none"
fill-rule="evenodd"
>
<g
transform="translate(15.955 13.087)"
>
<mask
fill="#fff"
id="b"
>
<use
href="#a"
/>
</mask>
<path
d="M.001 15.006h15.318V.014H.001z"
fill="#4285F4"
fill-rule="nonzero"
mask="url(#b)"
/>
</g>
<g
transform="translate(1.613 19.003)"
>
<mask
fill="#fff"
id="d"
>
<use
href="#c"
/>
</mask>
<path
d="M.084 12.956h24.819V.031H.084z"
fill="#34A853"
fill-rule="nonzero"
mask="url(#d)"
/>
</g>
<g
transform="translate(0 8.784)"
>
<mask
fill="#fff"
id="f"
>
<use
href="#e"
/>
</mask>
<path
d="M0 14.384h7.028V.052H0z"
fill="#FBBC04"
fill-rule="nonzero"
mask="url(#f)"
/>
</g>
<g
transform="translate(1.613)"
>
<mask
fill="#fff"
id="h"
>
<use
href="#g"
/>
</mask>
<path
d="M.084 12.97h24.935V.046H.084z"
fill="#EA4335"
fill-rule="nonzero"
mask="url(#h)"
/>
</g>
</g>
</svg>
`;

exports[`EuiIcon props type logoHAproxy is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down
79 changes: 79 additions & 0 deletions src/components/icon/assets/logo_google_g.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import React from 'react';

const EuiIconLogoGoogleG = ({ title, titleId, ...props }) => (
<svg
viewBox="0 0 32 32"
width={32}
height={32}
xmlns="http://www.w3.org/2000/svg"
aria-labelledby={titleId}
{...props}>
{title ? <title id={titleId}>{title}</title> : null}
<defs>
<path
id="a"
d="M15.319 3.278c0-1.131-.102-2.22-.29-3.264H0v6.172h8.587c-.37 1.995-1.494 3.685-3.184 4.816v4.004h5.157c3.017-2.778 4.758-6.869 4.758-11.728z"
/>
<path
id="c"
d="M14.343 12.956c4.308 0 7.92-1.43 10.56-3.866l-5.157-4.004c-1.429.958-3.256 1.523-5.403 1.523-4.156 0-7.674-2.806-8.928-6.578H.084v4.134c2.625 5.215 8.021 8.79 14.259 8.79z"
/>
<path
id="e"
d="M7.028 10.25a9.59 9.59 0 01-.5-3.032 9.59 9.59 0 01.5-3.032V.052h-5.33A15.95 15.95 0 000 7.218c0 2.575.617 5.012 1.697 7.166l5.331-4.134z"
/>
<path
id="g"
d="M14.343 6.392c2.342 0 4.446.805 6.1 2.386l4.576-4.576C22.256 1.627 18.644.046 14.343.046 8.105.046 2.709 3.622.083 8.836l5.332 4.134c1.254-3.77 4.772-6.578 8.928-6.578z"
/>
</defs>
<g fill="none" fillRule="evenodd">
<g transform="translate(15.955 13.087)">
<mask id="b" fill="#fff">
<use xlinkHref="#a" />
</mask>
<path
fill="#4285F4"
fillRule="nonzero"
mask="url(#b)"
d="M.001 15.006h15.318V.014H.001z"
/>
</g>
<g transform="translate(1.613 19.003)">
<mask id="d" fill="#fff">
<use xlinkHref="#c" />
</mask>
<path
fill="#34A853"
fillRule="nonzero"
mask="url(#d)"
d="M.084 12.956h24.819V.031H.084z"
/>
</g>
<g transform="translate(0 8.784)">
<mask id="f" fill="#fff">
<use xlinkHref="#e" />
</mask>
<path
fill="#FBBC04"
fillRule="nonzero"
mask="url(#f)"
d="M0 14.384h7.028V.052H0z"
/>
</g>
<g transform="translate(1.613)">
<mask id="h" fill="#fff">
<use xlinkHref="#g" />
</mask>
<path
fill="#EA4335"
fillRule="nonzero"
mask="url(#h)"
d="M.084 12.97h24.935V.046H.084z"
/>
</g>
</g>
</svg>
);

export const icon = EuiIconLogoGoogleG;
1 change: 1 addition & 0 deletions src/components/icon/assets/logo_google_g.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ const typeToPathMap = {
logoGithub: 'logo_github',
logoGmail: 'logo_gmail',
logoGolang: 'logo_golang',
logoGoogleG: 'logo_google_g',
logoHAproxy: 'logo_haproxy',
logoIBM: 'logo_ibm',
logoIBMMono: 'logo_ibm_mono',
Expand Down

0 comments on commit dc12039

Please sign in to comment.