mirror of
https://github.com/strapi/strapi.git
synced 2025-11-09 14:51:29 +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);
|
} = render(App);
|
||||||
|
|
||||||
expect(firstChild).toMatchInlineSnapshot(`
|
expect(firstChild).toMatchInlineSnapshot(`
|
||||||
.c37 {
|
|
||||||
font-family: Lato;
|
|
||||||
}
|
|
||||||
|
|
||||||
.c5 {
|
.c5 {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
@ -404,6 +400,10 @@ describe('<ListPage />', () => {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.c37 {
|
||||||
|
font-family: Lato;
|
||||||
|
}
|
||||||
|
|
||||||
<main
|
<main
|
||||||
aria-labelledby="title"
|
aria-labelledby="title"
|
||||||
class="c0"
|
class="c0"
|
||||||
|
|||||||
@ -55,74 +55,6 @@ describe('DynamicTable', () => {
|
|||||||
const { container, getByText } = render(app);
|
const { container, getByText } = render(app);
|
||||||
|
|
||||||
expect(container.firstChild).toMatchInlineSnapshot(`
|
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 {
|
.c12 {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
@ -316,6 +248,74 @@ describe('DynamicTable', () => {
|
|||||||
height: 0.25rem;
|
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
|
<div
|
||||||
class="c0"
|
class="c0"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -57,7 +57,7 @@ const FilterPicker = ({ displayedFilters, isVisible, onToggle, source }) => {
|
|||||||
const appliedFilter = displayedFilters.find(filter => filter.name === modifiedData.name);
|
const appliedFilter = displayedFilters.find(filter => filter.name === modifiedData.name);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover source={source} padding={3}>
|
<Popover source={source} padding={3} spacingTop={1}>
|
||||||
<FocusTrap onEscape={onToggle}>
|
<FocusTrap onEscape={onToggle}>
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
<Stack size={1} style={{ minWidth: 184 }}>
|
<Stack size={1} style={{ minWidth: 184 }}>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import { useIntl } from 'react-intl';
|
||||||
import { Button, Box } from '@strapi/parts';
|
import { Button, Box } from '@strapi/parts';
|
||||||
import { FilterIcon } from '@strapi/icons';
|
import { FilterIcon } from '@strapi/icons';
|
||||||
import FilterList from './FilterList';
|
import FilterList from './FilterList';
|
||||||
@ -7,6 +8,7 @@ import FilterPicker from './FilterPicker';
|
|||||||
|
|
||||||
const Filters = ({ displayedFilters }) => {
|
const Filters = ({ displayedFilters }) => {
|
||||||
const [isVisible, setIsVisible] = useState(false);
|
const [isVisible, setIsVisible] = useState(false);
|
||||||
|
const { formatMessage } = useIntl();
|
||||||
const buttonRef = useRef();
|
const buttonRef = useRef();
|
||||||
|
|
||||||
const handleToggle = () => {
|
const handleToggle = () => {
|
||||||
@ -23,14 +25,16 @@ const Filters = ({ displayedFilters }) => {
|
|||||||
onClick={handleToggle}
|
onClick={handleToggle}
|
||||||
size="S"
|
size="S"
|
||||||
>
|
>
|
||||||
Filters
|
{formatMessage({ id: 'app.utils.filters', defaultMessage: 'Filters' })}
|
||||||
</Button>
|
</Button>
|
||||||
|
{isVisible && (
|
||||||
<FilterPicker
|
<FilterPicker
|
||||||
displayedFilters={displayedFilters}
|
displayedFilters={displayedFilters}
|
||||||
isVisible={isVisible}
|
isVisible={isVisible}
|
||||||
onToggle={handleToggle}
|
onToggle={handleToggle}
|
||||||
source={buttonRef}
|
source={buttonRef}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
<FilterList />
|
<FilterList />
|
||||||
</>
|
</>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user