mirror of
https://github.com/strapi/strapi.git
synced 2025-10-19 12:02:38 +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 React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
import { Option } from '@buffetjs/core';
|
import { Option, Text } from '@buffetjs/core';
|
||||||
import Text from './Text';
|
|
||||||
|
|
||||||
const Filter = ({ displayName, filter, name, onClick, value }) => {
|
const Filter = ({ displayName, filter, name, onClick, value }) => {
|
||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
const label = (
|
const label = (
|
||||||
<>
|
<>
|
||||||
<Text>{displayName}</Text>
|
<Text color="mediumBlue" as="span">
|
||||||
<Text fontWeight="700">
|
{displayName}
|
||||||
|
</Text>
|
||||||
|
<Text as="span" color="mediumBlue" fontWeight="bold">
|
||||||
{formatMessage({ id: `components.FilterOptions.FILTER_TYPES.${filter}` })}
|
{formatMessage({ id: `components.FilterOptions.FILTER_TYPES.${filter}` })}
|
||||||
</Text>
|
</Text>
|
||||||
<Text>{value}</Text>
|
<Text as="span" color="mediumBlue">
|
||||||
|
{value}
|
||||||
|
</Text>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user