This repository has been archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/add-schedule' into develop
- Loading branch information
Showing
25 changed files
with
5,578 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import { ConfigProvider, Switch, SwitchProps, ThemeConfig } from "antd" | ||
import { FC } from "react" | ||
import { forwardRef } from "react" | ||
import BlackButtonTheme from "@/config/them/theme-blackButton.json" | ||
|
||
const BlackSwitch: FC<SwitchProps> = (antdSwitchProps) => { | ||
return ( | ||
<ConfigProvider theme={BlackButtonTheme as ThemeConfig}> | ||
<Switch {...antdSwitchProps} /> | ||
</ConfigProvider> | ||
) | ||
} | ||
const BlackSwitch = forwardRef<HTMLButtonElement, SwitchProps>( | ||
(antdSwitchProps, ref) => { | ||
return ( | ||
<ConfigProvider theme={BlackButtonTheme as ThemeConfig}> | ||
<Switch {...antdSwitchProps} ref={ref} /> | ||
</ConfigProvider> | ||
) | ||
}, | ||
) | ||
|
||
BlackSwitch.displayName = "BlackSwitch" | ||
|
||
export default BlackSwitch |
15 changes: 15 additions & 0 deletions
15
...src/page/WorkSpace/AI/AIAgent/components/ScheduleEditor/components/RowContainer/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { FC } from "react" | ||
import { IRowContainerProps } from "./interface" | ||
import { RowContainerStyle, labelStyle } from "./style" | ||
|
||
const RowContainer: FC<IRowContainerProps> = (props) => { | ||
const { labelName, children, enabled } = props | ||
return ( | ||
<div css={RowContainerStyle}> | ||
{labelName && <span css={labelStyle(enabled)}>{labelName}</span>} | ||
{children} | ||
</div> | ||
) | ||
} | ||
|
||
export default RowContainer |
7 changes: 7 additions & 0 deletions
7
.../page/WorkSpace/AI/AIAgent/components/ScheduleEditor/components/RowContainer/interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { ReactNode } from "react" | ||
|
||
export interface IRowContainerProps { | ||
labelName?: string | ||
children: ReactNode | ||
enabled: boolean | ||
} |
28 changes: 28 additions & 0 deletions
28
.../src/page/WorkSpace/AI/AIAgent/components/ScheduleEditor/components/RowContainer/style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { css } from "@emotion/react" | ||
import { getColor } from "@illa-public/color-scheme" | ||
import { applyMobileStyle } from "@illa-public/utils" | ||
|
||
const basLayoutContainerStyle = css` | ||
display: flex; | ||
padding: 8px 16px; | ||
width: 100%; | ||
` | ||
|
||
export const RowContainerStyle = css` | ||
${basLayoutContainerStyle}; | ||
justify-content: space-between; | ||
align-items: center; | ||
gap: 16px; | ||
` | ||
|
||
export const labelStyle = (enabled: boolean) => css` | ||
font-size: 14px; | ||
color: ${enabled ? getColor("grayBlue", "02") : getColor("grayBlue", "04")}; | ||
line-height: 22px; | ||
font-weight: 500; | ||
white-space: nowrap; | ||
width: 200px; | ||
${applyMobileStyle(css` | ||
width: auto; | ||
`)} | ||
` |
Oops, something went wrong.