File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
src/content/components/uikit Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ import dynamic from 'next/dynamic' ;
2+
3+ import { Repos } from '../../../../types/common' ;
4+ import { getGithubUrl , getReadmeUrl , mappingOptions } from '../../utils' ;
5+
6+ const getterOptions = { repoName : Repos . Uikit , componentName : 'Hotkey' } ;
7+
8+ export const hotkeyConfig = {
9+ id : 'hotkey' ,
10+ title : 'Hotkey' ,
11+ githubUrl : getGithubUrl ( getterOptions ) ,
12+ content : {
13+ readmeUrl : getReadmeUrl ( getterOptions ) ,
14+ } ,
15+ sandbox : {
16+ component : dynamic ( ( ) => import ( '@gravity-ui/uikit' ) . then ( ( mod ) => mod . Hotkey ) ) ,
17+ props : {
18+ value : {
19+ type : 'input' ,
20+ defaultValue : 'mod+a mod+c mod+v' ,
21+ } ,
22+ view : {
23+ type : 'select' ,
24+ values : mappingOptions ( [ 'light' , 'dark' ] ) ,
25+ } ,
26+ platform : {
27+ type : 'select' ,
28+ values : mappingOptions ( [ 'pc' , 'mac' ] ) ,
29+ } ,
30+ } ,
31+ } ,
32+ } ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {checkboxConfig} from './Checkbox';
1515import { disclosureConfig } from './Disclosure' ;
1616import { dropdownMenuConfig } from './DropdownMenu' ;
1717import { helpMarkConfig } from './HelpMark' ;
18+ import { hotkeyConfig } from './Hotkey' ;
1819import { iconConfig } from './Icon' ;
1920import { labelConfig } from './Label' ;
2021import { linkConfig } from './Link' ;
@@ -99,6 +100,7 @@ const uikitComponents: Component[] = [
99100 sheetConfig ,
100101 stepperConfig ,
101102 helpMarkConfig ,
103+ hotkeyConfig ,
102104] ;
103105
104106export const uikit : Lib = {
You can’t perform that action at this time.
0 commit comments