Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import { Box } from '@semcore/ui/base-components';
import { Box, Flex } from '@semcore/ui/base-components';
import Button from '@semcore/ui/button';
import Input from '@semcore/ui/input';
import Modal from '@semcore/ui/modal';
import Select from '@semcore/ui/select';
import Tooltip from '@semcore/ui/tooltip';
import { Text } from '@semcore/ui/typography';
import React from 'react';

const options = Array(2)
.fill('')
.map((_, index) => `Option ${index}`);

const Demo = () => {
const [visible, setVisible] = React.useState(false);

return (
<React.Fragment>
<Flex gap={2} direction='column' alignItems='flex-start'>
<Button onClick={() => setVisible(true)}>Open modal with tooltips</Button>
<Modal visible={visible} onClose={() => setVisible(false)} w={536}>
<Box mb={2}>
Expand Down Expand Up @@ -43,7 +48,25 @@ const Demo = () => {
</Input>
</Tooltip>
</Modal>
</React.Fragment>
<Select>
<Select.Trigger
placeholder='Select option with tooltip'
aria-label='Select option with tooltip'
mt={2}
id='select-with-tooltips'
/>
<Select.Menu>
<Tooltip w='100px' timeout={[0, 50]} ignorePortalsStacking placement='left'>
{options.map((option, index) => (
<Select.Option value={option} key={index} tag={Tooltip.Trigger}>
{option}
</Select.Option>
))}
<Tooltip.Popper w={200}>Tooltip Content</Tooltip.Popper>
</Tooltip>
</Select.Menu>
</Select>
</Flex>
);
};

Expand Down
Loading