-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: Delete step interaction"
This reverts commit 721e52d.
- Loading branch information
Showing
3 changed files
with
101 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React, { useState } from 'react'; | ||
import { DateRanger } from '@oceanbase/ui'; | ||
import { Checkbox, Divider, Flex } from '@oceanbase/design'; | ||
|
||
export default () => { | ||
const options = [ | ||
// { label: 'hasPlay', value: 'hasPlay' }, | ||
{ label: 'hasRewind', value: 'hasRewind' }, | ||
{ label: 'hasForward', value: 'hasForward' }, | ||
// { label: 'hasZoomOut', value: 'hasZoomOut' }, | ||
]; | ||
|
||
const [state, setState] = useState(options.map(item => item.value)); | ||
|
||
const onChange = checkedValue => { | ||
setState(checkedValue); | ||
}; | ||
const getValue = name => { | ||
return state.some(v => v === name); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<Flex gap="middle" vertical> | ||
<Checkbox.Group options={options} value={state} onChange={onChange} /> | ||
</Flex> | ||
<Divider children="preview" /> | ||
<DateRanger | ||
mode="step" | ||
hasForward={getValue('hasForward')} | ||
// hasPlay={getValue('hasPlay')} | ||
hasRewind={getValue('hasRewind')} | ||
// hasZoomOut={getValue('hasZoomOut')} | ||
/> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters