Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ICON] Adding annotation icon #2691

Merged
merged 5 commits into from
Dec 19, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Converted `EuiHighlight` to Typescript ([#2681](https://github.com/elastic/eui/pull/2681))
- Converted `EuiPage` and related child components to TypeScript ([#2669](https://github.com/elastic/eui/pull/2669))
- Added `annotation` glyph ([#2691](https://github.com/elastic/eui/pull/2691))

**Bug fixes**

Expand Down
1 change: 1 addition & 0 deletions src-docs/src/views/icon/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
export const iconTypes = [
'accessibility',
'alert',
'annotation',
'apmTrace',
'apps',
'arrowDown',
Expand Down
18 changes: 18 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,24 @@ exports[`EuiIcon props type alert is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type annotation is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<title />
<path
d="M3 6.5a4.5 4.5 0 115 4.473V16H7v-5.027A4.5 4.5 0 013 6.5z"
/>
</svg>
`;

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

const EuiIconAnnotation = ({ title, ...props }) => (
<svg
width={16}
height={16}
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<title>{title}</title>
<path d="M3 6.5a4.5 4.5 0 115 4.473V16H7v-5.027A4.5 4.5 0 013 6.5z" />
</svg>
);

export const icon = EuiIconAnnotation;
3 changes: 3 additions & 0 deletions src/components/icon/assets/annotation.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 @@ -22,6 +22,7 @@ const typeToPathMap = {
addDataApp: 'app_add_data',
advancedSettingsApp: 'app_advanced_settings',
alert: 'alert',
annotation: 'annotation',
apmApp: 'app_apm',
apmTrace: 'apm_trace',
apps: 'apps',
Expand Down