mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-23 06:56:22 +00:00
Migrate NotFound component to tailwind
This commit is contained in:
@@ -30,7 +30,7 @@ const MainHeader: FCWithDeps<unknown, MainHeaderDeps> = () => {
|
||||
return (
|
||||
<Navbar color="primary" dark fixed="top" className="main-header" expand="md">
|
||||
<NavbarBrand tag={Link} to="/">
|
||||
<ShlinkLogo className="main-header__brand-logo" color="white" /> Shlink
|
||||
<ShlinkLogo className="main-header__brand-logo tw:inline" color="white" /> Shlink
|
||||
</NavbarBrand>
|
||||
|
||||
<NavbarToggler onClick={toggleCollapse}>
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
import { SimpleCard } from '@shlinkio/shlink-frontend-kit';
|
||||
import { Button, SimpleCard } from '@shlinkio/shlink-frontend-kit/tailwind';
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import { Link } from 'react-router';
|
||||
|
||||
type NotFoundProps = PropsWithChildren<{ to?: string }>;
|
||||
|
||||
export const NotFound: FC<NotFoundProps> = ({ to = '/', children = 'Home' }) => (
|
||||
<div className="home">
|
||||
<SimpleCard className="p-4">
|
||||
<div className="tw:pt-4">
|
||||
<SimpleCard className="tw:p-4 tw:w-full tw:lg:w-[50%] tw:m-auto">
|
||||
<h2>Oops! We could not find requested route.</h2>
|
||||
<p>
|
||||
Use your browser's back button to navigate to the page you have previously come from, or just press this
|
||||
button.
|
||||
</p>
|
||||
<br />
|
||||
<Link to={to} className="btn btn-outline-primary btn-lg">{children}</Link>
|
||||
<Button inline to={to} size="lg">{children}</Button>
|
||||
</SimpleCard>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -5,6 +5,7 @@ import pack from '../package.json';
|
||||
import { container } from './container';
|
||||
import { setUpStore } from './container/store';
|
||||
import { register as registerServiceWorker } from './serviceWorkerRegistration';
|
||||
import './tailwind.css';
|
||||
import './index.scss';
|
||||
|
||||
const store = setUpStore(container);
|
||||
|
||||
3
src/tailwind.css
Normal file
3
src/tailwind.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@import 'tailwindcss' prefix(tw) important;
|
||||
@source '../node_modules/@shlinkio/shlink-frontend-kit';
|
||||
@import '@shlinkio/shlink-frontend-kit/tailwind.preset.css';
|
||||
Reference in New Issue
Block a user