feat: first

This commit is contained in:
EleanorMao
2023-04-22 23:00:38 +08:00
parent edf473c172
commit 5ae1d9c5b2
44 changed files with 10913 additions and 16089 deletions

View File

@ -1,38 +0,0 @@
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

View File

@ -1,9 +0,0 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

View File

@ -1,26 +1,98 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
import { BreakpointProvider } from './components/Breakpoint'
import { ConfigProvider } from 'antd'
import { Steps } from './components/Steps'
const brandPrimary = '#FF5200';
const textPrimary = '#1E1D1F'
const textDarker = '#000022'
const textLighter = '#8F9296'
const white = '#FDFDFD'
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
const items = [
{
title: 'Account',
},
{
title: 'Tester Info',
},
{
title: 'Review',
},
{
title: 'Done',
},
];
return (
<ConfigProvider
theme={{
token: {
colorBgMask: 'rgba(217, 217, 217, 0.65)',
colorLink: brandPrimary,
colorLinkHover: brandPrimary,
colorLinkActive: brandPrimary,
colorPrimary: brandPrimary,
colorText: textPrimary,
colorTextBase: textPrimary,
fontSize: 16,
fontSizeHeading1: 28,
fontSizeHeading2: 22,
fontSizeHeading3: 20,
lineHeightHeading1: 1.3,
lineHeightHeading2: 1.3,
lineHeightHeading3: 1.3,
fontSizeHeading4: 16,
fontFamily: 'Lato, Helvetica, Arial, sans-serif'
},
components: {
Button: {
// button base
fontSize: 20,
borderRadius: 4,
controlHeight: 45,
lineHeight: 45 / 20,
controlOutlineWidth: 0,
controlOutline: 'transparent',
// primary button
colorPrimary: '#FF5A0C',
colorTextLightSolid: white,
colorPrimaryHover: brandPrimary,
colorPrimaryActive: brandPrimary,
// disabled button
colorBgContainerDisabled: '#CACACC',
colorTextDisabled: white,
// text button
colorText: brandPrimary,
colorBgTextHover: 'transparent',
colorBgTextActive: 'transparent',
},
Modal: {
borderRadiusLG: 10,
boxShadow: '2px 2px 4px 1px rgba(0, 0, 0, 0.2)',
paddingContentHorizontalLG: 32,
},
Tooltip: {
fontSize: 14,
paddingSM: 12,
paddingXS: 10,
borderRadius: 4,
colorTextLightSolid: textDarker,
colorBgDefault: white,
},
Steps: {
colorSplit: brandPrimary,
colorTextDescription: textLighter,
}
}
}}
>
<BreakpointProvider>
<div>iHealth</div>
<Steps current={1} items={items} />
</BreakpointProvider>
</ConfigProvider>
);
}
export default App;

View File

@ -0,0 +1,8 @@
import React, { FC, PropsWithChildren } from 'react'
import { BreakpointProps, useBreakpoint } from './useBreakpoint'
export const Breakpoint: FC<PropsWithChildren<BreakpointProps>> = ({ children, ...props }) => {
const enabled = useBreakpoint(props)
return enabled ? <>{children}</> : null
}

View File

@ -0,0 +1,25 @@
import React, { FC, PropsWithChildren } from 'react'
import { Size, useSize } from './useSize'
export const breakpointList = {
xs: 0,
s: 576,
m: 768,
l: 992,
xl: 1200,
}
export interface BreakpointContextProps {
size: Size,
breakpointList: typeof breakpointList
}
export const BreakpointContext = React.createContext<BreakpointContextProps>({ breakpointList, size: {} } as any)
export const BreakpointProvider: FC<PropsWithChildren> = ({ children }) => {
const size = useSize()
return (
<BreakpointContext.Provider value={{ size, breakpointList }}>{children}</BreakpointContext.Provider>
)
}

View File

@ -0,0 +1,3 @@
export { BreakpointProvider } from './BreakpointProvider'
export { useBreakpoint } from './useBreakpoint'
export { Breakpoint } from './Breakpoint'

View File

@ -0,0 +1,81 @@
import { useContext } from 'react';
import { BreakpointContext } from './BreakpointProvider'
import { uaParser } from '../../utils/uaParser'
export interface DeviceType {
mobile?: boolean;
tablet?: boolean;
desktop?: boolean;
}
export interface OrientationType {
landscape?: boolean
portrait?: boolean
}
export interface Breakpoints {
xs?: boolean
s?: boolean
m?: boolean
l?: boolean
xl?: boolean
// greater than the width
up?: boolean
// less than the width
down?: boolean
width?: {
min?: number
max?: number
}
}
export type BreakpointProps = DeviceType & Breakpoints & OrientationType
const deviceType = ['mobile', 'tablet', 'desktop']
const currentDeviceType = ['mobile', 'tablet'].includes(uaParser.device.model || '') ? uaParser.device.model : 'desktop'
function matchWidth(width: number, min?: number, max?: number): boolean {
if (typeof min === 'number' && typeof max === 'number') {
return width >= min && width <= max
}
if (typeof min === 'number') {
return width >= min
}
if (typeof max === 'number') {
return width <= max
}
return false
}
export const useBreakpoint = (props: BreakpointProps): boolean => {
const { breakpointList, size: { orientation, ...size } } = useContext(BreakpointContext)
let enabled: boolean
const allKeys = Object.keys(props)
const keysWithoutDeviceType = allKeys.filter(key => !deviceType.includes(key))
const keysWithDeviceType = allKeys.filter(key => deviceType.includes(key))
enabled = keysWithoutDeviceType.every(key => {
if (typeof breakpointList[key as keyof typeof breakpointList] === 'number' && !props.width) {
if (props.up) {
return size.width > breakpointList[key as keyof typeof breakpointList]
}
if (props.down) {
return size.width <= breakpointList[key as keyof typeof breakpointList]
}
return size.width === breakpointList[key as keyof typeof breakpointList]
}
if (key === 'width') {
return matchWidth(3000, props.width?.min, props.width?.max)
}
if (key === 'landscape' || key === 'portrait') {
return key === orientation
}
return true
}) && (keysWithDeviceType.length ? keysWithDeviceType.some(key => currentDeviceType === key) : true)
return enabled
}

View File

@ -0,0 +1,56 @@
import { useCallback, useLayoutEffect, useState } from 'react'
type Orientation = "portrait" | "landscape"
function getOrientation(): Orientation {
if (
window.screen.orientation &&
Object.prototype.hasOwnProperty.call(window, 'onorientationchange')
) {
return window.screen.orientation.type.includes('portrait') ? 'portrait' : 'landscape'
}
if (
Object.prototype.hasOwnProperty.call(window, 'orientation')
) {
return Math.abs(window.orientation) !== 90 ? 'portrait' : 'landscape'
}
return window.innerHeight / window.innerWidth > 1 ? "portrait" : "landscape"
}
export interface Size {
width: number
height: number
orientation: Orientation
}
export function useSize():Size {
const [width, setWidth] = useState<number>(document.documentElement.clientWidth)
const [height, setHeight] = useState<number>(document.documentElement.clientHeight)
const [orientation, setOrientation] = useState<Orientation>(getOrientation())
const resizeListener = useCallback(() => {
setWidth(document.documentElement.clientWidth)
setHeight(document.documentElement.clientHeight)
}, [])
const orientationListener =useCallback( () => {
setOrientation(getOrientation())
},[])
useLayoutEffect(() => {
window.addEventListener('resize', resizeListener)
window.addEventListener('orientationchange', orientationListener)
return () => {
window.removeEventListener('resize', resizeListener)
window.removeEventListener('orientationchange', orientationListener)
}
})
return {
width,
height,
orientation
}
}

View File

@ -0,0 +1,9 @@
import React, { FC } from 'react'
import { Button as AntdButton, ButtonProps as AntdButtonProps } from 'antd'
export type ButtonProps = Omit<AntdButtonProps, 'danger' | 'ghost' | 'shape' | 'size' | 'type'> & {
type?: 'primary' | 'link' | 'text'
}
export const Button: FC<ButtonProps> = (props) => {
return <AntdButton type="primary" {...props} />
}

View File

@ -0,0 +1 @@
export * from './Button'

View File

@ -0,0 +1,8 @@
import React, { FC } from 'react'
import { Modal as AntdModal, ModalProps as AntdModalProps } from 'antd'
import { ReactComponent as CloseIcon } from '../../icons/close.svg'
export type ModalProps = Omit<AntdModalProps, 'footer' | 'closeIcon' | 'title' | 'okText' | 'okType' | 'okButtonProps' | 'cancelText' | 'cancelButtonProps'>
export const Modal: FC<ModalProps> = (props) => {
return <AntdModal centered {...props} footer={null} closeIcon={<CloseIcon />} />
}

View File

@ -0,0 +1 @@
export * from './Modal'

View File

@ -0,0 +1,24 @@
import React, { FC, PropsWithChildren } from 'react'
import styled from 'styled-components'
const StyledStepIcon = styled.div<{ $active?: boolean }>`
background: ${props => props.$active ? '#FFAB83' : '#FFFFFF'};
border: 1px solid ${props => props.$active ? '#FFAB83' : '#FF5200'};
width: 24px;
height: 24px;
line-height: 24px;
margin-top: 0;
margin-bottom: 0;
margin-inline-start: 0;
margin-inline-end: 8px;
font-size: 12px;
color: #1E1D1F;
font-weight: 400;
text-align: center;
border-radius: 50%;
transition: background-color .3s, border-color .3s;
`
export const StepIcon: FC<PropsWithChildren<{ active: boolean }>> = ({ children, active }) => {
return <StyledStepIcon $active={active}>{children}</StyledStepIcon>
}

View File

@ -0,0 +1,43 @@
import React, { FC } from 'react'
import { Steps as AntdSteps, StepsProps as AntdStepsProps } from 'antd'
import { StepProps } from 'antd/es/steps'
import styled from 'styled-components'
import {StepIcon} from './StepIcon'
export type StepsProps = Omit<AntdStepsProps, 'labelPlacement' | 'size' | 'status' | 'type' | 'items'> & {
items: Omit<StepProps, 'icon' | 'description'>[]
}
const StyledSteps = styled(AntdSteps)`
&.ant-steps-label-vertical {
.ant-steps-item-content {
margin-top: 5px;
}
.ant-steps-item-tail {
top: 8px;
margin-inline-start: 53px;
padding: 4px 12px;
}
}
.ant-steps-item-title {
font-size: 12px;
line-height: 14px;
}
.ant-steps-item-finish > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title {
color: #8F9296;
}
`
export const Steps: FC<StepsProps> = ({ items, current = 0, ...props }) => {
const formattedItems = items.map((item, index) => {
return {
...item,
icon: <StepIcon active={index <= current}>{index + 1}</StepIcon>
}
})
return (
<StyledSteps labelPlacement="vertical" {...props} current={current} items={formattedItems} />
)
}

View File

@ -0,0 +1 @@
export * from './Steps'

View File

@ -0,0 +1,21 @@
import React, { PropsWithChildren } from 'react'
import styled from 'styled-components'
import {TinyText} from '../Typography'
const StyledTag = styled.div`
background: #FFAB83;
border-radius: 7px;
text-align: center;
height: 14px;
line-height: 14px;
display: inline-block;
> span {
position: relative;
display: inline-block;
top: -4px;
}
`
export const Tag: React.FC<PropsWithChildren> = (props) => {
return <StyledTag><TinyText>{props.children}</TinyText></StyledTag>
}

View File

@ -0,0 +1 @@
export * from './Tag'

View File

@ -0,0 +1,33 @@
import React, { FC, useCallback } from 'react'
import { Tooltip as AntdTooltip, TooltipProps as AntdTooltipProps } from 'antd'
import { ReactComponent as CloseIcon } from '../../icons/close.svg'
import styled from 'styled-components'
export type TooltipProps = AntdTooltipProps & { closeable?: boolean; primary?: boolean }
const Close = styled.span`
line-height: 17px;
vertical-align: middle;
cursor: pointer;
padding-left: 4px;
> svg {
width: 14px;
height: 14px;
line-height: 17px;
}
`
export const Tooltip: FC<TooltipProps> = ({ closeable, primary, title, overlayClassName, ...props }) => {
const handleClick = useCallback(() => {
document.documentElement.click()
}, [])
return (
<AntdTooltip
trigger="click"
overlayClassName={`health-tooltip${primary ? '-highlighted' : ''} ${overlayClassName || ''}`}
{...props}
title={<>{title} {closeable ? <Close><CloseIcon onClick={handleClick} /></Close> : null}</>}
/>
)
}

View File

@ -0,0 +1 @@
export * from './Tooltip'

View File

@ -0,0 +1,22 @@
import React, { FC, ComponentProps } from 'react'
import { Typography, TypographyProps } from 'antd'
import styled from 'styled-components'
type ButtonTextProps = ComponentProps<TypographyProps['Text']> & {
level?: 1 | 2
}
const StyledButtonText = styled(Typography.Text)<{ $level: 1 | 2 }>`
${props => props.$level === 1 ? `
font-weight: 500;
font-size: 20px;
line-height: 20px;
` : `
font-weight: 400;
font-size: 12px;
line-height: 14px;
`}
`
export const ButtonText: FC<ButtonTextProps> = ({ level = 1, ...props }) => {
return <StyledButtonText {...props} $level={level} />
}

View File

@ -0,0 +1,17 @@
import React, { FC, ComponentProps } from 'react'
import { Typography, TypographyProps } from 'antd'
import styled from 'styled-components'
type AdditionalParagraphProps = ComponentProps<TypographyProps['Paragraph']> & {
level?: 1 | 2
}
const StyledParagraph2 = styled(Typography.Paragraph)`
font-size: 12px;
`
export const Paragraph: FC<AdditionalParagraphProps> = ({ level = 1, ...props }) => {
if (level === 2) {
return <StyledParagraph2 {...props} />
}
return <Typography.Paragraph {...props} />
}

View File

@ -0,0 +1,16 @@
import React, { FC, ComponentProps } from 'react'
import { Typography, TypographyProps } from 'antd'
import styled from 'styled-components'
type TinyTextProps = ComponentProps<TypographyProps['Text']>
const StyledTinyText = styled(Typography.Text)`
font-weight: 400;
font-size: 12px;
transform: scale(0.66667);
line-height: 1.75;
color: #1E1D1F;
`
export const TinyText: FC<TinyTextProps> = (props) => {
return <StyledTinyText {...props} />
}

View File

@ -0,0 +1,8 @@
import { Typography } from 'antd'
const { Text, Title, Link } = Typography
export * from './Paragraph'
export * from './ButtonText'
export * from './TinyText'
export { Text, Title, Link }

3
src/icons/close.svg Normal file
View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.29289 6.29289C6.68342 5.90237 7.31658 5.90237 7.70711 6.29289L16 14.5858L24.2929 6.29289C24.6834 5.90237 25.3166 5.90237 25.7071 6.29289C26.0976 6.68342 26.0976 7.31658 25.7071 7.70711L17.4142 16L25.7071 24.2929C26.0976 24.6834 26.0976 25.3166 25.7071 25.7071C25.3166 26.0976 24.6834 26.0976 24.2929 25.7071L16 17.4142L7.70711 25.7071C7.31658 26.0976 6.68342 26.0976 6.29289 25.7071C5.90237 25.3166 5.90237 24.6834 6.29289 24.2929L14.5858 16L6.29289 7.70711C5.90237 7.31658 5.90237 6.68342 6.29289 6.29289Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 662 B

View File

@ -1,13 +0,0 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

View File

@ -1,8 +1,10 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import 'typeface-lato'
import 'antd/dist/reset.css';
import './styles/antd.min.css';
import './styles/reset.css';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
@ -12,8 +14,3 @@ root.render(
<App />
</React.StrictMode>
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,15 +0,0 @@
import { ReportHandler } from 'web-vitals';
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
export default reportWebVitals;

1
src/styles/antd.min.css vendored Normal file

File diff suppressed because one or more lines are too long

47
src/styles/reset.css Normal file
View File

@ -0,0 +1,47 @@
.ant-btn:not(.ant-btn-link):not(.ant-btn-text) {
font-weight: 500 !important;
}
.ant-btn-link, .ant-btn-text {
font-size: 12px;
line-height: 16px;
}
.ant-wave {
display: none !important;
}
.ant-typography h1 {
color: #1E1D1F;
}
.ant-modal .ant-modal-close {
top: 9px !important;
right: 9px !important;
color: #000022 !important;
}
.ant-modal .ant-modal-close:hover {
background: transparent !important;
}
.ant-modal .ant-modal-close-x {
font-size: 24px !important;
line-height: 1 !important;
}
.health-tooltip-highlighted.ant-tooltip .ant-tooltip-arrow:after {
box-shadow: 1px 1px 0 #FF5A0C;
}
.health-tooltip-highlighted.ant-tooltip .ant-tooltip-inner {
position: relative;
box-shadow: 1px 1px 0px 0 #FF5A0C, -1px -1px 0px 0 #FF5A0C, -1px 1px 0px 0 #FF5A0C, 1px -1px 0px 0 #FF5A0C;
}
.health-tooltip.ant-tooltip .ant-tooltip-arrow:after {
box-shadow: 1px 1px 0 #000022;
}
.health-tooltip.ant-tooltip .ant-tooltip-inner {
position: relative;
box-shadow: 0 2px 0px 0 #000022, 0 2px 0px 0px #000022, 1px 1px 0px 2px #000022;
}

3
src/utils/uaParser.ts Normal file
View File

@ -0,0 +1,3 @@
import UAParser from 'ua-parser-js'
export const uaParser = UAParser()