From 63a4b4a55558fe0d809526bd167a256bd1887921 Mon Sep 17 00:00:00 2001 From: Shipow Date: Fri, 5 Jun 2020 10:05:55 +0200 Subject: [PATCH] fix(design) Control Key Icon --- src/DocSearchButton.tsx | 8 ++++++-- src/icons/ControlKeyIcon.tsx | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/icons/ControlKeyIcon.tsx diff --git a/src/DocSearchButton.tsx b/src/DocSearchButton.tsx index 2344f745..af993abc 100644 --- a/src/DocSearchButton.tsx +++ b/src/DocSearchButton.tsx @@ -1,6 +1,7 @@ import React, { useState, useEffect } from 'react'; import { SearchIcon } from './icons/SearchIcon'; +import { ControlKeyIcon } from './icons/ControlKeyIcon'; const ACTION_KEY_DEFAULT = 'Ctrl'; const ACTION_KEY_APPLE = '⌘'; @@ -9,7 +10,6 @@ function isAppleDevice() { if (typeof navigator === 'undefined') { return ACTION_KEY_DEFAULT; } - return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform); } @@ -33,7 +33,11 @@ export function DocSearchButton( ); diff --git a/src/icons/ControlKeyIcon.tsx b/src/icons/ControlKeyIcon.tsx new file mode 100644 index 00000000..de1f4e34 --- /dev/null +++ b/src/icons/ControlKeyIcon.tsx @@ -0,0 +1,15 @@ +import React from 'react'; + +export function ControlKeyIcon() { + return ( + + + + ); +}