fix: svg icon size
This commit is contained in:
parent
e764f334d1
commit
089d69a095
4 changed files with 8 additions and 19 deletions
|
@ -19,6 +19,7 @@ import LogoIcon3 from '@/assets/images/logo-3.svg'
|
||||||
import LogoIcon4 from '@/assets/images/logo-4.svg'
|
import LogoIcon4 from '@/assets/images/logo-4.svg'
|
||||||
import LogoIcon5 from '@/assets/images/logo-5.svg'
|
import LogoIcon5 from '@/assets/images/logo-5.svg'
|
||||||
import LogoIcon6 from '@/assets/images/logo-6.svg'
|
import LogoIcon6 from '@/assets/images/logo-6.svg'
|
||||||
|
|
||||||
import { getDay } from 'date-fns'
|
import { getDay } from 'date-fns'
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
|
@ -72,7 +73,7 @@ export default function App() {
|
||||||
<Toaster richColors offset="70px" visibleToasts={1} position="top-center"></Toaster>
|
<Toaster richColors offset="70px" visibleToasts={1} position="top-center"></Toaster>
|
||||||
</AppContainer>
|
</AppContainer>
|
||||||
<AppButton onClick={handleToggleApp}>
|
<AppButton onClick={handleToggleApp}>
|
||||||
<DayLogo></DayLogo>
|
<DayLogo className="max-h-full max-w-full"></DayLogo>
|
||||||
</AppButton>
|
</AppButton>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
@ -92,7 +92,7 @@ const AppButton: FC<AppButtonProps> = ({ children, onClick }) => {
|
||||||
<Button
|
<Button
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
onContextMenu={handleToggleMenu}
|
onContextMenu={handleToggleMenu}
|
||||||
className="relative z-10 size-11 rounded-full p-0 text-xs shadow-lg shadow-slate-500/50"
|
className="relative z-10 size-11 overflow-hidden rounded-full p-0 text-xs shadow-lg shadow-slate-500/50"
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
20
src/types/shim.d.ts
vendored
20
src/types/shim.d.ts
vendored
|
@ -1,17 +1,7 @@
|
||||||
// issues: https://github.com/facebook/react/issues/17157
|
declare module '*.svg' {
|
||||||
// issues: https://github.com/facebook/react/pull/24730
|
import * as React from 'react'
|
||||||
declare module 'react' {
|
|
||||||
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
|
||||||
inert?: boolean | undefined | ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare global {
|
const ReactComponent: React.FunctionComponent<React.ComponentProps<'svg'> & { title?: string }>
|
||||||
namespace JSX {
|
|
||||||
interface IntrinsicAttributes {
|
|
||||||
inert?: boolean | undefined | ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export {}
|
export default ReactComponent
|
||||||
|
}
|
||||||
|
|
|
@ -35,8 +35,6 @@ export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
react(),
|
react(),
|
||||||
svgr({
|
svgr({
|
||||||
// svgr options: https://react-svgr.com/docs/options/
|
|
||||||
svgrOptions: { exportType: 'default', ref: true, svgo: false, titleProp: true },
|
|
||||||
include: '**/*.svg'
|
include: '**/*.svg'
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Reference in a new issue