Settings: Fix color badge with long stage names

This commit is contained in:
Gustav Hansen 2023-05-02 12:08:20 +02:00
parent a8adb71ec2
commit c996eca2ea
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { components } from 'react-select';
import { Box, Flex, Typography } from '@strapi/design-system';
import { Flex, Typography } from '@strapi/design-system';
export function OptionColor({ children, ...props }) {
const { color } = props.data;
@ -9,7 +9,7 @@ export function OptionColor({ children, ...props }) {
return (
<components.Option {...props}>
<Flex alignItems="center" gap={2}>
<Box height={2} background={color} hasRadius width={2} />
<Flex height={2} background={color} hasRadius shrink={0} width={2} />
<Typography textColor="neutral800" ellipsis>
{children}

View File

@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { components } from 'react-select';
import { Box, Flex, Typography } from '@strapi/design-system';
import { Flex, Typography } from '@strapi/design-system';
export function SingleValueColor({ children, ...props }) {
const { color } = props.data;
@ -9,7 +9,7 @@ export function SingleValueColor({ children, ...props }) {
return (
<components.SingleValue {...props}>
<Flex alignItems="center" gap={2}>
<Box height={2} background={color} hasRadius width={2} />
<Flex height={2} background={color} hasRadius shrink={0} width={2} />
<Typography textColor="neutral800" ellipsis>
{children}