diff --git a/src/App.tsx b/src/App.tsx index 8f818a8..e330790 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -26,6 +26,7 @@ import { FormCrdPage, FactoryPage, FactoryAdminPage, + SearchPage, } from 'pages' import { getBasePrefix } from 'utils/getBaseprefix' import { colorsLight, colorsDark, sizes } from 'constants/colors' @@ -129,6 +130,10 @@ export const App: FC = ({ isFederation, forcedTheme }) => { path={`${prefix}/:clusterName/:namespace?/:syntheticProject?/factory/:key/*`} element={} /> + } + /> } /> ) diff --git a/src/components/atoms/BackLink/BackLink.tsx b/src/components/atoms/BackLink/BackLink.tsx index 38f0a5d..1c7eae3 100644 --- a/src/components/atoms/BackLink/BackLink.tsx +++ b/src/components/atoms/BackLink/BackLink.tsx @@ -7,17 +7,19 @@ import { Styled } from './styled' type TBackLinkProps = { title?: string className?: string - to: To + to?: To } export const BackLink: FC = ({ to, title }) => { return ( - - - - - + {to && ( + + + + + + )} {title} ) diff --git a/src/components/organisms/Search/Search.tsx b/src/components/organisms/Search/Search.tsx new file mode 100644 index 0000000..634d7f8 --- /dev/null +++ b/src/components/organisms/Search/Search.tsx @@ -0,0 +1,421 @@ +/* eslint-disable max-lines-per-function */ +import React, { FC } from 'react' +import { theme, Flex, Typography } from 'antd' +import { Styled } from './styled' + +export const Search: FC = () => { + const { token } = theme.useToken() + + return ( + <> + + + + + + + + + + + + + + To Be Done + + + + + + + + + + + + ) +} diff --git a/src/components/organisms/Search/index.ts b/src/components/organisms/Search/index.ts new file mode 100644 index 0000000..354d403 --- /dev/null +++ b/src/components/organisms/Search/index.ts @@ -0,0 +1 @@ +export * from './Search' diff --git a/src/components/organisms/Search/styled.ts b/src/components/organisms/Search/styled.ts new file mode 100644 index 0000000..a2c5f3d --- /dev/null +++ b/src/components/organisms/Search/styled.ts @@ -0,0 +1,11 @@ +import styled from 'styled-components' + +export const CatContainer = styled.div` + display: flex; + justify-content: center; + align-items: center; +` + +export const Styled = { + CatContainer, +} diff --git a/src/components/organisms/Sidebar/styled.ts b/src/components/organisms/Sidebar/styled.ts index c73b141..06c74dc 100644 --- a/src/components/organisms/Sidebar/styled.ts +++ b/src/components/organisms/Sidebar/styled.ts @@ -19,7 +19,7 @@ const ClusterSelectorContainer = styled.div` display: flex; justify-content: center; align-items: center; - padding: 12px 12px; + padding: 12px; ` export const Styled = { diff --git a/src/components/organisms/index.ts b/src/components/organisms/index.ts index 9cda41a..6459370 100644 --- a/src/components/organisms/index.ts +++ b/src/components/organisms/index.ts @@ -12,3 +12,4 @@ export * from './Header' export * from './HeaderSecond' export * from './Sidebar' export * from './Footer' +export * from './Search' diff --git a/src/pages/SearchPage/SearchPage.tsx b/src/pages/SearchPage/SearchPage.tsx new file mode 100644 index 0000000..922f312 --- /dev/null +++ b/src/pages/SearchPage/SearchPage.tsx @@ -0,0 +1,47 @@ +import React, { FC } from 'react' +import { ContentCard } from '@prorobotech/openapi-k8s-toolkit' +import { useParams } from 'react-router-dom' +import { BackLink, ManageableBreadcrumbs, ManageableSidebar, NavigationContainer, Search } from 'components' +import { getSidebarIdPrefix } from 'utils/getSidebarIdPrefix' +import { getBreadcrumbsIdPrefix } from 'utils/getBreadcrumbsIdPrefix' +import { BaseTemplate } from 'templates' + +type TSearchPageProps = { + forcedTheme?: 'light' | 'dark' +} + +export const SearchPage: FC = ({ forcedTheme }) => { + const { namespace, syntheticProject } = useParams() + + const possibleProject = syntheticProject && namespace ? syntheticProject : namespace + const possibleInstance = syntheticProject && namespace ? namespace : undefined + + const sidebarId = `${getSidebarIdPrefix({ instance: !!syntheticProject, project: !!namespace })}seach-page` + const breadcrumbsId = `${getBreadcrumbsIdPrefix({ + instance: !!syntheticProject, + project: !!namespace, + })}seach-page` + + return ( + + } + > + + + + + + + + + ) +} diff --git a/src/pages/SearchPage/index.ts b/src/pages/SearchPage/index.ts new file mode 100644 index 0000000..a0ddf17 --- /dev/null +++ b/src/pages/SearchPage/index.ts @@ -0,0 +1 @@ +export { SearchPage } from './SearchPage' diff --git a/src/pages/index.ts b/src/pages/index.ts index 7cd914f..82d8723 100644 --- a/src/pages/index.ts +++ b/src/pages/index.ts @@ -17,3 +17,5 @@ export { FormApiPage } from './FormApiPage' export { FormBuiltinPage } from './FormBuiltinPage' export { FactoryPage } from './FactoryPage' export { FactoryAdminPage } from './FactoryAdminPage' +/* search */ +export { SearchPage } from './SearchPage'