mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore(ui): Make the Node UI Legend Responsive
This commit is contained in:
parent
2e70848aa0
commit
f258aba6d1
@ -1,20 +1,24 @@
|
|||||||
import 'reactflow/dist/style.css';
|
import 'reactflow/dist/style.css';
|
||||||
import { Tooltip, Badge, HStack } from '@chakra-ui/react';
|
import { Tooltip, Badge, Flex } from '@chakra-ui/react';
|
||||||
import { map } from 'lodash';
|
import { map } from 'lodash';
|
||||||
import { FIELDS } from '../types/constants';
|
import { FIELDS } from '../types/constants';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
|
|
||||||
const FieldTypeLegend = () => {
|
const FieldTypeLegend = () => {
|
||||||
return (
|
return (
|
||||||
<HStack>
|
<Flex gap={2} flexDirection={{ base: 'column', xl: 'row' }}>
|
||||||
{map(FIELDS, ({ title, description, color }, key) => (
|
{map(FIELDS, ({ title, description, color }, key) => (
|
||||||
<Tooltip key={key} label={description}>
|
<Tooltip key={key} label={description}>
|
||||||
<Badge colorScheme={color} sx={{ userSelect: 'none' }}>
|
<Badge
|
||||||
|
colorScheme={color}
|
||||||
|
sx={{ userSelect: 'none' }}
|
||||||
|
textAlign="center"
|
||||||
|
>
|
||||||
{title}
|
{title}
|
||||||
</Badge>
|
</Badge>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
))}
|
))}
|
||||||
</HStack>
|
</Flex>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user