mirror of
https://github.com/strapi/strapi.git
synced 2025-10-18 11:32:42 +00:00
Fix Filter
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
f65fdced7a
commit
ef8e233e9e
@ -1,14 +0,0 @@
|
||||
import styled from 'styled-components';
|
||||
import { Text as Base } from '@buffetjs/core';
|
||||
|
||||
const Text = styled(Base)`
|
||||
color: inherit;
|
||||
font-weight: ${({ fontWeight }) => fontWeight};
|
||||
`;
|
||||
|
||||
Text.defaultProps = {
|
||||
as: 'span',
|
||||
fontWeight: 400,
|
||||
};
|
||||
|
||||
export default Text;
|
@ -1,18 +1,21 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { Option } from '@buffetjs/core';
|
||||
import Text from './Text';
|
||||
import { Option, Text } from '@buffetjs/core';
|
||||
|
||||
const Filter = ({ displayName, filter, name, onClick, value }) => {
|
||||
const { formatMessage } = useIntl();
|
||||
const label = (
|
||||
<>
|
||||
<Text>{displayName}</Text>
|
||||
<Text fontWeight="700">
|
||||
<Text color="mediumBlue" as="span">
|
||||
{displayName}
|
||||
</Text>
|
||||
<Text as="span" color="mediumBlue" fontWeight="bold">
|
||||
{formatMessage({ id: `components.FilterOptions.FILTER_TYPES.${filter}` })}
|
||||
</Text>
|
||||
<Text>{value}</Text>
|
||||
<Text as="span" color="mediumBlue">
|
||||
{value}
|
||||
</Text>
|
||||
</>
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user