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

feat(controls): Add react versions of existing media control icons #1301

Merged
merged 2 commits into from
Dec 3, 2020
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
14 changes: 14 additions & 0 deletions src/lib/viewers/controls/icons/IconGear24.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as React from 'react';

function IconGear24(props: React.SVGProps<SVGSVGElement>): JSX.Element {
return (
<svg focusable={false} height={24} width={24} {...props}>
<path
d="M19.4 13c0-.3.1-.6.1-1s0-.7-.1-1l2.1-1.6c.2-.1.2-.4.1-.6l-2-3.5c-.1-.2-.4-.3-.6-.2l-2.5 1c-.5-.4-1.1-.7-1.7-1l-.4-2.7c.1-.2-.2-.4-.4-.4h-4c-.2 0-.5.2-.5.4l-.4 2.7c-.6.2-1.1.6-1.7 1l-2.5-1c-.2-.1-.4 0-.6.2l-2 3.5c-.1.1 0 .4.2.6L4.6 11c0 .3-.1.6-.1 1s0 .7.1 1l-2.1 1.6c-.2.1-.2.4-.1.6l2 3.5c.1.2.3.3.6.2l2.5-1c.5.4 1.1.7 1.7 1l.4 2.6c0 .2.2.4.5.4h4c.2 0 .5-.2.5-.4l.4-2.6c.6-.2 1.2-.6 1.7-1l2.5 1c.2.1.5 0 .6-.2l2-3.5c.1-.2.1-.5-.1-.6L19.4 13zM12 15.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z"
fill="#fff"
/>
</svg>
);
}

export default IconGear24;
12 changes: 12 additions & 0 deletions src/lib/viewers/controls/icons/IconPause24.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from 'react';

function IconPause24(props: React.SVGProps<SVGSVGElement>): JSX.Element {
return (
<svg fill="#fff" focusable={false} height={24} width={24} {...props}>
<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z" />
<path d="M0 0h24v24H0z" fill="none" />
</svg>
);
}

export default IconPause24;
12 changes: 12 additions & 0 deletions src/lib/viewers/controls/icons/IconPlay24.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from 'react';

function IconPlay24(props: React.SVGProps<SVGSVGElement>): JSX.Element {
return (
<svg fill="#fff" focusable={false} height={24} width={24} {...props}>
<path d="M8 5v14l11-7z" />
<path d="M0 0h24v24H0z" fill="none" />
</svg>
);
}

export default IconPlay24;
15 changes: 15 additions & 0 deletions src/lib/viewers/controls/icons/IconVolumeHigh24.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as React from 'react';

function IconVolumeHigh24(props: React.SVGProps<SVGSVGElement>): JSX.Element {
return (
<svg focusable={false} height={24} viewBox="-3 5 24 24" width={24} {...props}>
<path d="M0 14v6h4l5 5V9l-5 5H0z" fill="#FFF" />
<path
d="M13.5 17c0-1.8-1-3.3-2.5-4v8c1.5-.7 2.5-2.2 2.5-4zM11 8.2v2.1c2.9.9 5 3.5 5 6.7s-2.1 5.9-5 6.7v2.1c4-.9 7-4.5 7-8.8s-3-7.9-7-8.8z"
fill="#FFF"
/>
</svg>
);
}

export default IconVolumeHigh24;
12 changes: 12 additions & 0 deletions src/lib/viewers/controls/icons/IconVolumeLow24.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from 'react';

function IconVolumeLow24(props: React.SVGProps<SVGSVGElement>): JSX.Element {
return (
<svg focusable={false} height={24} viewBox="-3 5 24 24" width={24} {...props}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these negative values in the viewBox worrisome?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SVGs are copied directly from the existing icons. I'd rather not mess with them much.

<path d="M0 14v6h4l5 5V9l-5 5H0z" fill="#FFF" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these #fff and #FFF be consistent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other icons are already inconsistent. I can do this separately if it's important?

Copy link
Contributor

@cweeii cweeii Dec 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be using the buie $white color?

<path d="M-3 5h24v24H-3V5z" fill="none" />
</svg>
);
}

export default IconVolumeLow24;
12 changes: 12 additions & 0 deletions src/lib/viewers/controls/icons/IconVolumeMedium24.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from 'react';

function IconVolumeMedium24(props: React.SVGProps<SVGSVGElement>): JSX.Element {
return (
<svg focusable={false} height={24} viewBox="-3 5 24 24" width={24} {...props}>
<path d="M0 14v6h4l5 5V9l-5 5H0z" fill="#FFF" />
<path d="M13.5 17c0-1.8-1-3.3-2.5-4v8c1.5-.7 2.5-2.2 2.5-4z" fill="#FFF" />
</svg>
);
}

export default IconVolumeMedium24;
12 changes: 12 additions & 0 deletions src/lib/viewers/controls/icons/IconVolumeMute24.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from 'react';

function IconVolumeMute24(props: React.SVGProps<SVGSVGElement>): JSX.Element {
return (
<svg focusable={false} height={24} viewBox="-3 5 24 24" width={24} {...props}>
<path d="M0 14v6h4l5 5V9l-5 5H0z" fill="#FFF" />
<path d="M15.5 20.2l-2-2-2 2-1.2-1.2 2-2-2-2 1.2-1.2 2 2 2-2 1.2 1.2-2 2 2 2" fill="#fff" />
</svg>
);
}

export default IconVolumeMute24;