mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 03:17:11 +00:00
Fix messages
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
5b34f91d82
commit
53563d82a3
@ -54,10 +54,6 @@ describe('<ListPage />', () => {
|
||||
} = render(App);
|
||||
|
||||
expect(firstChild).toMatchInlineSnapshot(`
|
||||
.c37 {
|
||||
font-family: Lato;
|
||||
}
|
||||
|
||||
.c5 {
|
||||
font-weight: 600;
|
||||
font-size: 2rem;
|
||||
@ -404,6 +400,10 @@ describe('<ListPage />', () => {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.c37 {
|
||||
font-family: Lato;
|
||||
}
|
||||
|
||||
<main
|
||||
aria-labelledby="title"
|
||||
class="c0"
|
||||
|
||||
@ -55,74 +55,6 @@ describe('DynamicTable', () => {
|
||||
const { container, getByText } = render(app);
|
||||
|
||||
expect(container.firstChild).toMatchInlineSnapshot(`
|
||||
.c24 {
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
line-height: 1.25;
|
||||
color: #666687;
|
||||
}
|
||||
|
||||
.c19 {
|
||||
background: #ffffff;
|
||||
padding: 64px;
|
||||
}
|
||||
|
||||
.c21 {
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
|
||||
.c23 {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.c20 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.c22 svg {
|
||||
height: 5.5rem;
|
||||
}
|
||||
|
||||
.c16 tr:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.c17 {
|
||||
border-bottom: 1px solid #eaeaef;
|
||||
}
|
||||
|
||||
.c17 td,
|
||||
.c17 th {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.c17 td:first-of-type,
|
||||
.c17 th:first-of-type {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.c18 {
|
||||
vertical-align: middle;
|
||||
text-align: left;
|
||||
color: #666687;
|
||||
outline-offset: -4px;
|
||||
}
|
||||
|
||||
.c18 input {
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
.c12 {
|
||||
font-weight: 400;
|
||||
font-size: 0.875rem;
|
||||
@ -316,6 +248,74 @@ describe('DynamicTable', () => {
|
||||
height: 0.25rem;
|
||||
}
|
||||
|
||||
.c24 {
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
line-height: 1.25;
|
||||
color: #666687;
|
||||
}
|
||||
|
||||
.c19 {
|
||||
background: #ffffff;
|
||||
padding: 64px;
|
||||
}
|
||||
|
||||
.c21 {
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
|
||||
.c23 {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.c20 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.c22 svg {
|
||||
height: 5.5rem;
|
||||
}
|
||||
|
||||
.c16 tr:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.c17 {
|
||||
border-bottom: 1px solid #eaeaef;
|
||||
}
|
||||
|
||||
.c17 td,
|
||||
.c17 th {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.c17 td:first-of-type,
|
||||
.c17 th:first-of-type {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.c18 {
|
||||
vertical-align: middle;
|
||||
text-align: left;
|
||||
color: #666687;
|
||||
outline-offset: -4px;
|
||||
}
|
||||
|
||||
.c18 input {
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
<div
|
||||
class="c0"
|
||||
>
|
||||
|
||||
@ -57,7 +57,7 @@ const FilterPicker = ({ displayedFilters, isVisible, onToggle, source }) => {
|
||||
const appliedFilter = displayedFilters.find(filter => filter.name === modifiedData.name);
|
||||
|
||||
return (
|
||||
<Popover source={source} padding={3}>
|
||||
<Popover source={source} padding={3} spacingTop={1}>
|
||||
<FocusTrap onEscape={onToggle}>
|
||||
<form onSubmit={handleSubmit}>
|
||||
<Stack size={1} style={{ minWidth: 184 }}>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import React, { useRef, useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { Button, Box } from '@strapi/parts';
|
||||
import { FilterIcon } from '@strapi/icons';
|
||||
import FilterList from './FilterList';
|
||||
@ -7,6 +8,7 @@ import FilterPicker from './FilterPicker';
|
||||
|
||||
const Filters = ({ displayedFilters }) => {
|
||||
const [isVisible, setIsVisible] = useState(false);
|
||||
const { formatMessage } = useIntl();
|
||||
const buttonRef = useRef();
|
||||
|
||||
const handleToggle = () => {
|
||||
@ -23,14 +25,16 @@ const Filters = ({ displayedFilters }) => {
|
||||
onClick={handleToggle}
|
||||
size="S"
|
||||
>
|
||||
Filters
|
||||
{formatMessage({ id: 'app.utils.filters', defaultMessage: 'Filters' })}
|
||||
</Button>
|
||||
<FilterPicker
|
||||
displayedFilters={displayedFilters}
|
||||
isVisible={isVisible}
|
||||
onToggle={handleToggle}
|
||||
source={buttonRef}
|
||||
/>
|
||||
{isVisible && (
|
||||
<FilterPicker
|
||||
displayedFilters={displayedFilters}
|
||||
isVisible={isVisible}
|
||||
onToggle={handleToggle}
|
||||
source={buttonRef}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
<FilterList />
|
||||
</>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user