Skip to content

Commit

Permalink
NU-1694 change DTPickerStyled approach
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzuming committed Jun 13, 2024
1 parent 693d8dd commit bd993cc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
21 changes: 9 additions & 12 deletions designer/client/src/components/NodeInput.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { css } from "@mui/material";
import { CSSProperties } from "react";

export const nodeInputCss = (extended?: CSSProperties) =>
css({
height: "35px",
width: "100%",
padding: "0 10px",
border: "none",
'&[type="checkbox"]': {
height: "20px",
},
...extended,
});
export const nodeInputCss = css({
height: "35px",
width: "100%",
padding: "0 10px",
border: "none",
'&[type="checkbox"]': {
height: "20px",
},
});
6 changes: 1 addition & 5 deletions designer/client/src/components/common/DTPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import { useTranslation } from "react-i18next";
import { styled } from "@mui/material";
import { nodeInputCss } from "../NodeInput";

const DTPickerStyled = styled(DateTimePicker)(() => ({
...nodeInputCss({
padding: "0",
}),
}));
const DTPickerStyled = styled(DateTimePicker)(nodeInputCss, { padding: 0 });
const style = {
background: "none",
border: "none",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const RawEditorComponent = (props: RawEditorProps, forwardedRef: ForwardedRef<Re
rows: rows,
cols: cols,
className: cx(nodeInput),
style: nodeInputCss(),
style: nodeInputCss,
value: value,
language: language,
onValueChange: onValueChange,
Expand Down

0 comments on commit bd993cc

Please sign in to comment.