Skip to content

Commit

Permalink
Add index to components/ui
Browse files Browse the repository at this point in the history
  • Loading branch information
bbovenzi committed Oct 31, 2024
1 parent e4952cb commit 8aa8afd
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 16 deletions.
2 changes: 1 addition & 1 deletion airflow/ui/src/components/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
import React, { type ReactNode, useCallback, useRef } from "react";

import Pagination from "../ui/Pagination";
import { ProgressBar } from "../ui/Progress";
import { ProgressBar } from "../ui/ProgressBar";
import { CardList } from "./CardList";
import { TableList } from "./TableList";
import { createSkeletonMock } from "./skeleton";
Expand Down
File renamed without changes.
32 changes: 32 additions & 0 deletions airflow/ui/src/components/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export { default as Dialog } from "./Dialog";
export { default as Pagination } from "./Pagination";
export { default as Select } from "./Select";
export { Alert } from "./Alert";
export { CloseButton } from "./CloseButton";
export { InputGroup } from "./InputGroup";

export { Switch } from "./Switch";
export { Tag } from "./Tag";
export { Tooltip } from "./Tooltip";

export { ProgressBar } from "./ProgressBar";
export { default as Menu } from "./Menu";
2 changes: 1 addition & 1 deletion airflow/ui/src/layouts/Nav/DocsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import { Button, Link } from "@chakra-ui/react";
import { FiBookOpen } from "react-icons/fi";

import Menu from "src/components/ui/Menu";
import { Menu } from "src/components/ui";

import { navButtonProps } from "./navButtonProps";

Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/layouts/Nav/TimezoneModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import React from "react";

import Dialog from "src/components/ui/Dialog";
import { Dialog } from "src/components/ui";

import TimezoneSelector from "./TimezoneSelector";

Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/layouts/Nav/UserSettingsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import timezone from "dayjs/plugin/timezone";
import utc from "dayjs/plugin/utc";
import { FiClock, FiMoon, FiSun, FiUser } from "react-icons/fi";

import Menu from "src/components/ui/Menu";
import { Menu } from "src/components/ui";
import { useColorMode } from "src/context/colorMode/useColorMode";
import { useTimezone } from "src/context/timezone";

Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/pages/DagsList/Dag/Dag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
useDagsServiceRecentDagRuns,
} from "openapi/queries";
import { ErrorAlert } from "src/components/ErrorAlert";
import { ProgressBar } from "src/components/ui/Progress";
import { ProgressBar } from "src/components/ui";

import { Header } from "./Header";

Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/pages/DagsList/Dag/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import type { DAGResponse, DAGRunResponse } from "openapi/requests/types.gen";
import { DagIcon } from "src/assets/DagIcon";
import Time from "src/components/Time";
import { TogglePause } from "src/components/TogglePause";
import { Tooltip } from "src/components/ui/Tooltip";
import { Tooltip } from "src/components/ui";

import { DagTags } from "../DagTags";
import { LatestRun } from "../LatestRun";
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/pages/DagsList/DagCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Link as RouterLink } from "react-router-dom";
import type { DAGWithLatestDagRunsResponse } from "openapi/requests/types.gen";
import Time from "src/components/Time";
import { TogglePause } from "src/components/TogglePause";
import { Tooltip } from "src/components/ui/Tooltip";
import { Tooltip } from "src/components/ui";

import { DagTags } from "./DagTags";
import { LatestRun } from "./LatestRun";
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/pages/DagsList/DagTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Flex, Text, VStack } from "@chakra-ui/react";
import { FiTag } from "react-icons/fi";

import type { DagTagPydantic } from "openapi/requests/types.gen";
import { Tooltip } from "src/components/ui/Tooltip";
import { Tooltip } from "src/components/ui";

const MAX_TAGS = 3;

Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/pages/DagsList/DagsFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { useSearchParams } from "react-router-dom";
import { useDagServiceGetDagTags } from "openapi/queries";
import { useTableURLState } from "src/components/DataTable/useTableUrlState";
import { QuickFilterButton } from "src/components/QuickFilterButton";
import Select from "src/components/ui/Select";
import { Select } from "src/components/ui";
import {
SearchParamsKeys,
type SearchParamsKeysType,
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/pages/DagsList/DagsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { ErrorAlert } from "src/components/ErrorAlert";
import { SearchBar } from "src/components/SearchBar";
import Time from "src/components/Time";
import { TogglePause } from "src/components/TogglePause";
import Select from "src/components/ui/Select";
import { Select } from "src/components/ui";
import {
SearchParamsKeys,
type SearchParamsKeysType,
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/pages/DagsList/RecentRuns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import duration from "dayjs/plugin/duration";

import type { DAGWithLatestDagRunsResponse } from "openapi/requests/types.gen";
import Time from "src/components/Time";
import { Tooltip } from "src/components/ui/Tooltip";
import { Tooltip } from "src/components/ui";
import { stateColor } from "src/utils/stateColor";

dayjs.extend(duration);
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/pages/DagsList/Schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Text } from "@chakra-ui/react";
import { FiCalendar } from "react-icons/fi";

import type { DAGWithLatestDagRunsResponse } from "openapi/requests/types.gen";
import { Tooltip } from "src/components/ui/Tooltip";
import { Tooltip } from "src/components/ui";

type Props = {
readonly dag: DAGWithLatestDagRunsResponse;
Expand Down
3 changes: 1 addition & 2 deletions airflow/ui/src/pages/Dashboard/HealthSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
*/
import { Skeleton, TagLabel, Text } from "@chakra-ui/react";

import { Tag } from "src/components/ui/Tag";
import { Tooltip } from "src/components/ui/Tooltip";
import { Tag, Tooltip } from "src/components/ui";

export const HealthSection = ({
isLoading,
Expand Down
3 changes: 1 addition & 2 deletions airflow/ui/src/pages/Dashboard/HealthTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
import { Skeleton, TagLabel, Text } from "@chakra-ui/react";

import Time from "src/components/Time";
import { Tag } from "src/components/ui/Tag";
import { Tooltip } from "src/components/ui/Tooltip";
import { Tag, Tooltip } from "src/components/ui";
import { capitalize } from "src/utils";

export const HealthTag = ({
Expand Down

0 comments on commit 8aa8afd

Please sign in to comment.