mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 07:26:51 +03:00
349033fb12
Also, ensure changes from this PR are included in the session branch: https://github.com/urbit/urbit/pull/5529
25 lines
562 B
TypeScript
25 lines
562 B
TypeScript
import React, { useCallback } from 'react';
|
|
import { Icon } from '@tlon/indigo-react';
|
|
import { useDetectOS } from './lib/useDetectOS';
|
|
|
|
export const InfoButton = () => {
|
|
const { isMacOS } = useDetectOS();
|
|
|
|
const onInfoClick = useCallback(() => {
|
|
const key = isMacOS ? 'alt' : 'shift';
|
|
|
|
alert(`To select text in the terminal, hold down the ${key} key.`);
|
|
}, [isMacOS]);
|
|
|
|
return (
|
|
<>
|
|
<button className="info-btn" onClick={onInfoClick}>
|
|
<Icon
|
|
icon="Info"
|
|
size="18px"
|
|
/>
|
|
</button>
|
|
</>
|
|
);
|
|
};
|