Skip to content

Commit

Permalink
fix: 💄 ui style
Browse files Browse the repository at this point in the history
  • Loading branch information
AruSeito committed Nov 10, 2022
1 parent 46fcaf8 commit ff7e9b3
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 33 deletions.
4 changes: 2 additions & 2 deletions apps/builder/src/components/PanelBar/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export const panelBarItemAnimation: Variants = {

export const addIconHotpotStyle = css`
font-size: 12px;
width: 24px;
height: 24px;
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
Expand Down
8 changes: 4 additions & 4 deletions apps/builder/src/middleware/redux/reduxAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,12 @@ export const reduxAsync: Redux.Middleware = (store) => (next) => (action) => {
addedSectionName,
} = action.payload as AddTargetPageSectionPayload
const pageNode = searchDsl(getCanvas(store.getState()), pageName)
const addSectionNode = searchDsl(
getCanvas(store.getState()),
addedSectionName,
if (!pageNode) break
const addSectionNode = pageNode.childrenNode.find(
(node) => node.showName === addedSectionName,
)
if (!addSectionNode) break

if (!pageNode || !addSectionNode) break
const WSPagePayload = transformComponentReduxPayloadToWsPayload(
pageNode,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { FC, useCallback } from "react"
import { PanelBar } from "@/components/PanelBar"
import { useTranslation } from "react-i18next"
import { homePageIconStyle, pageItemWrapperStyle, pageNameStyle } from "./style"
import {
homePageIconHotSpot,
homePageIconStyle,
pageItemWrapperStyle,
pageNameStyle,
} from "./style"
import { PageItemProps } from "./interface"
import { ReactComponent as HomepageIcon } from "@/assets/dataWorkspace/homepage.svg"
import { useDispatch, useSelector } from "react-redux"
Expand Down Expand Up @@ -35,7 +40,9 @@ export const PageItem: FC<PageItemProps> = (props) => {
}}
>
<span css={pageNameStyle}>{pageName}</span>
{isHomePage && <HomepageIcon css={homePageIconStyle} />}
<div css={homePageIconHotSpot}>
{isHomePage && <HomepageIcon css={homePageIconStyle} />}
</div>
</div>
</Dropdown>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ export const pageNameStyle = css`
font-weight: 500;
`

export const homePageIconHotSpot = css`
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
`

export const homePageIconStyle = css`
font-size: 12px;
width: 12px;
Expand All @@ -23,6 +31,7 @@ export const pageItemWrapperStyle = (isSelected: boolean) => {
width: 100%;
height: 24px;
cursor: pointer;
font-family: "Fira Code", monospace;
background-color: ${isSelected
? globalColor(`--${illaPrefix}-techPurple-07`)
: globalColor(`--${illaPrefix}-white-01`)};
Expand Down
Loading

0 comments on commit ff7e9b3

Please sign in to comment.