Skip to content

Commit

Permalink
fix: route bug && import repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
matto49 committed Aug 10, 2023
1 parent 0774458 commit 240ed40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 0 additions & 2 deletions packages/demo/src/components/Popover/demo/Trigger.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { Popover } from 'pivot-design';
import React from 'react';
import { prefix } from '../../constant';
import './index.scss';
import { prefix } from '../../constant';


const App: React.FC = () => {
return (
<>
Expand Down
5 changes: 3 additions & 2 deletions packages/demo/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.pivot-props-table {
border-collapse: collapse;
padding: 40px;
margin-bottom: 20px;
width: 100%;
font-family: Arial, sans-serif;
font-size: 18px;
Expand All @@ -16,8 +17,8 @@
th {
background-color: #f2f2f2;
width: auto;
font-weight: 500;
font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;
font-weight: 500;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 14px;
}

Expand Down
5 changes: 5 additions & 0 deletions packages/demo/src/pages/component/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ function Index() {
if (location.pathname === '/components') {
navigate('./button');
setSelect('button');
} else {
const componentName = location.pathname.split('/').pop();
if (componentName) {
setSelect(componentName);
}
}
}, []);

Expand Down

0 comments on commit 240ed40

Please sign in to comment.