2022-11-28 02:00:28 +00:00
|
|
|
import { LayoutGrid } from 'lucide-react';
|
|
|
|
|
|
|
|
import Linux from '@/assets/ico/linux.svg?c';
|
|
|
|
|
2022-06-17 16:18:42 +00:00
|
|
|
import { ButtonSelector } from '@@/form-components/ButtonSelector/ButtonSelector';
|
2022-11-28 02:00:28 +00:00
|
|
|
import { Icon } from '@@/Icon';
|
2022-04-14 10:14:23 +00:00
|
|
|
|
|
|
|
import { OS } from './types';
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
value: OS;
|
|
|
|
onChange(value: OS): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function OsSelector({ onChange, value }: Props) {
|
|
|
|
return (
|
|
|
|
<div className="form-group">
|
|
|
|
<div className="col-sm-12">
|
|
|
|
<ButtonSelector
|
|
|
|
size="small"
|
|
|
|
value={value}
|
|
|
|
onChange={(os: OS) => onChange(os)}
|
|
|
|
options={[
|
|
|
|
{
|
|
|
|
value: 'linux',
|
|
|
|
label: (
|
|
|
|
<>
|
2022-11-28 02:00:28 +00:00
|
|
|
<Icon icon={Linux} className="mr-1" />
|
2022-04-14 10:14:23 +00:00
|
|
|
Linux
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 'win',
|
|
|
|
label: (
|
|
|
|
<>
|
2022-11-28 02:00:28 +00:00
|
|
|
<Icon icon={LayoutGrid} className="mr-1" />
|
2022-04-14 10:14:23 +00:00
|
|
|
Windows
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|