Fix copy
This commit is contained in:
parent
a18ff0fedc
commit
d5d795ddcc
7 changed files with 27 additions and 7 deletions
|
@ -51,6 +51,10 @@ const AttributeListPage: React.FC<AttributeListPageProps> = ({
|
|||
</PageHeader>
|
||||
<Card>
|
||||
<SearchBar
|
||||
allTabLabel={intl.formatMessage({
|
||||
defaultMessage: "All Attributes",
|
||||
description: "tab name"
|
||||
})}
|
||||
currentTab={currentTab}
|
||||
initialSearch={initialSearch}
|
||||
searchPlaceholder={intl.formatMessage({
|
||||
|
|
|
@ -62,6 +62,10 @@ export const CategoryListPage: React.StatelessComponent<CategoryTableProps> = ({
|
|||
</PageHeader>
|
||||
<Card>
|
||||
<SearchBar
|
||||
allTabLabel={intl.formatMessage({
|
||||
defaultMessage: "All Categories",
|
||||
description: "tab name"
|
||||
})}
|
||||
currentTab={currentTab}
|
||||
initialSearch={initialSearch}
|
||||
searchPlaceholder={intl.formatMessage({
|
||||
|
|
|
@ -56,6 +56,10 @@ const CollectionListPage: React.StatelessComponent<CollectionListPageProps> = ({
|
|||
</PageHeader>
|
||||
<Card>
|
||||
<SearchBar
|
||||
allTabLabel={intl.formatMessage({
|
||||
defaultMessage: "All Collections",
|
||||
description: "tab name"
|
||||
})}
|
||||
currentTab={currentTab}
|
||||
initialSearch={initialSearch}
|
||||
searchPlaceholder={intl.formatMessage({
|
||||
|
|
|
@ -11,6 +11,7 @@ import Link from "../Link";
|
|||
import FilterTabs, { FilterTab } from "../TableFilter";
|
||||
|
||||
export interface SearchBarProps extends SearchPageProps, TabPageProps {
|
||||
allTabLabel: string;
|
||||
searchPlaceholder: string;
|
||||
}
|
||||
|
||||
|
@ -34,6 +35,7 @@ const useStyles = makeStyles(
|
|||
|
||||
const SearchBar: React.FC<SearchBarProps> = props => {
|
||||
const {
|
||||
allTabLabel,
|
||||
currentTab,
|
||||
initialSearch,
|
||||
onSearchChange,
|
||||
|
@ -54,13 +56,7 @@ const SearchBar: React.FC<SearchBarProps> = props => {
|
|||
return (
|
||||
<>
|
||||
<FilterTabs currentTab={currentTab}>
|
||||
<FilterTab
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "All Attributes",
|
||||
description: "tab name"
|
||||
})}
|
||||
onClick={onAll}
|
||||
/>
|
||||
<FilterTab label={allTabLabel} onClick={onAll} />
|
||||
{tabs.map((tab, tabIndex) => (
|
||||
<FilterTab
|
||||
onClick={() => onTabChange(tabIndex + 1)}
|
||||
|
|
|
@ -57,6 +57,10 @@ const CustomerListPage: React.StatelessComponent<CustomerListPageProps> = ({
|
|||
</PageHeader>
|
||||
<Card>
|
||||
<SearchBar
|
||||
allTabLabel={intl.formatMessage({
|
||||
defaultMessage: "All Customers",
|
||||
description: "tab name"
|
||||
})}
|
||||
currentTab={currentTab}
|
||||
initialSearch={initialSearch}
|
||||
searchPlaceholder={intl.formatMessage({
|
||||
|
|
|
@ -48,6 +48,10 @@ const SaleListPage: React.StatelessComponent<SaleListPageProps> = ({
|
|||
</PageHeader>
|
||||
<Card>
|
||||
<SearchBar
|
||||
allTabLabel={intl.formatMessage({
|
||||
defaultMessage: "All Sales",
|
||||
description: "tab name"
|
||||
})}
|
||||
currentTab={currentTab}
|
||||
initialSearch={initialSearch}
|
||||
searchPlaceholder={intl.formatMessage({
|
||||
|
|
|
@ -57,6 +57,10 @@ const OrderDraftListPage: React.StatelessComponent<OrderDraftListPageProps> = ({
|
|||
</PageHeader>
|
||||
<Card>
|
||||
<SearchBar
|
||||
allTabLabel={intl.formatMessage({
|
||||
defaultMessage: "All Drafts",
|
||||
description: "tab name"
|
||||
})}
|
||||
currentTab={currentTab}
|
||||
initialSearch={initialSearch}
|
||||
searchPlaceholder={intl.formatMessage({
|
||||
|
|
Loading…
Reference in a new issue