Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Jun 17, 2024
1 parent c3f233f commit 75786c2
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 30 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/npm-publish-canyon-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Npm Publish canyon-ui

on:
push:
branches: [ "*" ]

jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 9

publish-npm:
needs: [install]
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: pnpm install
- run: pnpm run build
- run: pnpm --filter=canyon-ui-old publish -f --no-git-checks --access=public --filter
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
2 changes: 1 addition & 1 deletion packages/canyon-ui-old/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "canyon-ui-old",
"version": "0.0.5",
"version": "0.0.8",
"type": "module",
"main": "dist/canyon-ui-old.cjs",
"module": "dist/canyon-ui-old.js",
Expand Down
4 changes: 3 additions & 1 deletion packages/canyon-ui-old/src/components/layout/Base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ interface CanyonLayoutBaseProps {
search: any;
account: any;
breadcrumb: any;
footerName?: string;
}
const CanyonLayoutBase: FC<CanyonLayoutBaseProps> = ({
title = 'Canyon',
Expand All @@ -56,6 +57,7 @@ const CanyonLayoutBase: FC<CanyonLayoutBaseProps> = ({
search,
account,
breadcrumb,
footerName = 'CANYON',
}) => {
const { token } = useToken();

Expand Down Expand Up @@ -193,7 +195,7 @@ const CanyonLayoutBase: FC<CanyonLayoutBaseProps> = ({
<div className={'m-auto w-[1150px] p-[12px]'}>{renderMainContent}</div>
</div>
}
footer={<Footer />}
footer={<Footer name={footerName} corp={'Trip.com'} />}
/>
</>
</div>
Expand Down
31 changes: 3 additions & 28 deletions packages/canyon-ui-old/src/components/layout/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,12 @@
import { Typography } from 'antd';
const { Text } = Typography;
import app from './app.json';
const AppFooter = () => {
const AppFooter = ({name,corp}) => {
const lists = app.footer;
return (
<footer className={'mx-auto w-[1250px] px-6 pb-20 pt-16'}>
<nav className={'grid grid-cols-4 gap-8'}>
{lists.map((item) => {
return (
<div key={item.title}>
<Text className={'text-[16px] block px-3.5 py-2'}>{item.title}</Text>
<div>
{item.children.map((child) => {
return (
<Text
key={child.label}
className={
'text-[16px] cursor-pointer px-3.5 py-2 rounded block hover:bg-[#F0F0F0] dark:hover:bg-[#1a1d1e]'
}
type={'secondary'}
onClick={() => {
window.open(child.link);
}}
>
{child.label}
</Text>
);
})}
</div>
</div>
);
})}
</nav>
<div style={{fontSize:'20px',fontWeight:'bolder',marginBottom:'20px'}}>{name}</div>
Copyright © 2024 {corp}, Inc. All rights reserved.
</footer>
);
};
Expand Down

0 comments on commit 75786c2

Please sign in to comment.