mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 06:59:09 +00:00
cleanup buttons
This commit is contained in:
@@ -1,18 +1,20 @@
|
|||||||
import { Button } from '@chakra-ui/button';
|
import { IconButton } from '@chakra-ui/button';
|
||||||
|
import { Tooltip } from '@chakra-ui/tooltip';
|
||||||
import { FiChevronsUp } from 'react-icons/fi';
|
import { FiChevronsUp } from 'react-icons/fi';
|
||||||
|
|
||||||
export default function CollapseBtn(props) {
|
export default function CollapseBtn(props) {
|
||||||
const { clickhandler } = props;
|
const { clickhandler } = props;
|
||||||
return (
|
return (
|
||||||
<Button
|
<Tooltip label='Collapse all'>
|
||||||
size={props.size || 'xs'}
|
<IconButton
|
||||||
leftIcon={<FiChevronsUp />}
|
size={props.size || 'xs'}
|
||||||
colorScheme='white'
|
icon={<FiChevronsUp />}
|
||||||
variant='outline'
|
colorScheme='white'
|
||||||
onClick={clickhandler}
|
variant='outline'
|
||||||
_focus={{ boxShadow: 'none' }}
|
background='#fff1'
|
||||||
>
|
onClick={clickhandler}
|
||||||
Collapse All
|
_focus={{ boxShadow: 'none' }}
|
||||||
</Button>
|
/>
|
||||||
|
</Tooltip>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import { Button } from '@chakra-ui/button';
|
|||||||
import { FiTarget } from 'react-icons/fi';
|
import { FiTarget } from 'react-icons/fi';
|
||||||
|
|
||||||
export default function CurrentBtn(props) {
|
export default function CurrentBtn(props) {
|
||||||
const { clickhandler } = props;
|
const { clickhandler, active } = props;
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
size={props.size || 'xs'}
|
size={props.size || 'xs'}
|
||||||
leftIcon={<FiTarget />}
|
leftIcon={<FiTarget />}
|
||||||
colorScheme='whiteAlpha'
|
colorScheme='whiteAlpha'
|
||||||
variant='outline'
|
variant={active ? 'solid' : 'outline'}
|
||||||
onClick={clickhandler}
|
onClick={clickhandler}
|
||||||
_focus={{ boxShadow: 'none' }}
|
_focus={{ boxShadow: 'none' }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
import { Button } from '@chakra-ui/button';
|
import { IconButton } from '@chakra-ui/button';
|
||||||
|
import { Tooltip } from '@chakra-ui/tooltip';
|
||||||
import { FiChevronsDown } from 'react-icons/fi';
|
import { FiChevronsDown } from 'react-icons/fi';
|
||||||
|
|
||||||
export default function ExpandBtn(props) {
|
export default function ExpandBtn(props) {
|
||||||
const { clickhandler } = props;
|
const { clickhandler } = props;
|
||||||
return (
|
return (
|
||||||
<Button
|
<Tooltip label='Expand all'>
|
||||||
size={props.size || 'xs'}
|
<IconButton
|
||||||
leftIcon={<FiChevronsDown />}
|
size={props.size || 'xs'}
|
||||||
colorScheme='white'
|
icon={<FiChevronsDown />}
|
||||||
variant='outline'
|
colorScheme='white'
|
||||||
onClick={clickhandler}
|
variant='outline'
|
||||||
_focus={{ boxShadow: 'none' }}
|
background='#fff1'
|
||||||
>
|
onClick={clickhandler}
|
||||||
Expand All
|
_focus={{ boxShadow: 'none' }}
|
||||||
</Button>
|
/>
|
||||||
|
</Tooltip>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import { IconButton } from '@chakra-ui/button';
|
||||||
|
import { Tooltip } from '@chakra-ui/tooltip';
|
||||||
|
import { FiTarget } from 'react-icons/fi';
|
||||||
|
|
||||||
|
export default function LockIconBtn(props) {
|
||||||
|
const { clickhandler, active, ref } = props;
|
||||||
|
return (
|
||||||
|
<Tooltip label='Lock cursor to current'>
|
||||||
|
<IconButton
|
||||||
|
ref={ref}
|
||||||
|
size={props.size || 'xs'}
|
||||||
|
icon={<FiTarget />}
|
||||||
|
colorScheme='pink'
|
||||||
|
color={'pink.300'}
|
||||||
|
variant={active ? 'solid' : 'outline'}
|
||||||
|
onClick={clickhandler}
|
||||||
|
_focus={{ boxShadow: 'none' }}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user