Skip to content

nav component issue fixes, component updates in progress #700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
nav component issue fixes, component updates in progress
  • Loading branch information
imtananikhwa committed Feb 22, 2024
commit f556fa7aa07061d9068eeb624d7ced4c51524f03
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const Link = styled(Button) <{ $style: LinkStyleType }>`
font-family:${props.$style.fontFamily};
font-weight:${props.$style.textWeight};
border: ${props.$style.borderWidth} solid ${props.$style.border};
border-radius:${props.$style.radius ? props.$style.radius:'0px'};
background-color: ${props.$style.background};
&:hover {
color: ${props.$style.hoverText} !important;
Expand All @@ -41,7 +42,8 @@ const Link = styled(Button) <{ $style: LinkStyleType }>`
color: ${props.$style.activeText} !important;
}
`}
&.ant-btn {

&.ant-btn {
display: inline-flex;
align-items: center;
> span {
Expand Down
20 changes: 13 additions & 7 deletions client/packages/lowcoder/src/comps/comps/navComp/navComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@ type IProps = {
$bgColor: string;
$borderColor: string;
$borderWidth: string;
$borderRadius: string;
};

const Wrapper = styled("div") <Pick<IProps, "$bgColor" | "$borderColor" | "$borderWidth">>`
const Wrapper = styled("div") <Pick<IProps, "$bgColor" | "$borderColor" | "$borderWidth" | "$borderRadius">>`
height: 100%;
border-radius: 2px;
border-radius: ${(props) => props.$borderRadius ? props.$borderRadius : '2px'};
box-sizing: border-box;
border: ${(props) => props.$borderWidth ? `${props.$borderWidth}` : '1px'} solid ${(props) => props.$borderColor};
background-color: ${(props) => props.$bgColor};
`;

const NavInner = styled("div") <Pick<IProps, "$justify">>`
margin: 0 -16px;
// margin: 0 -16px;
height: 100%;
display: flex;
justify-content: ${(props) => (props.$justify ? "space-between" : "left")};
Expand All @@ -49,17 +50,19 @@ const Item = styled.div<{
$fontStyle: string;
$textWeight: string;
$textSize: string;
$margin: string;
$padding: string;
}>`
height: 30px;
line-height: 30px;
padding: 0 16px;
padding: ${(props) => props.$padding ? props.$padding : '0 16px'};
color: ${(props) => (props.$active ? props.$activeColor : props.$color)};
font-weight: ${(props) => (props.$textWeight ? props.$textWeight : 500)};
font-family:${(props) => (props.$fontFamily ? props.$fontFamily : 'sans-serif')};
font-style:${(props) => (props.$fontStyle ? props.$fontStyle : 'normal')};
font-size:${(props) => (props.$textSize ? props.$textSize : '14px')}


font-size:${(props) => (props.$textSize ? props.$textSize : '14px')};
margin:${(props) => props.$margin ? props.$margin : '0px'};
&:hover {
color: ${(props) => props.$activeColor};
cursor: pointer;
Expand Down Expand Up @@ -157,6 +160,8 @@ const NavCompBase = new UICompBuilder(childrenMap, (props) => {
$fontStyle={props.style.fontStyle}
$textWeight={props.style.textWeight}
$textSize={props.style.textSize}
$padding={props.style.padding}
$margin={props.style.margin}
onClick={() => onEvent("click")}
>
{label}
Expand Down Expand Up @@ -195,6 +200,7 @@ const NavCompBase = new UICompBuilder(childrenMap, (props) => {
$borderColor={props.style.border}
$bgColor={props.style.background}
$borderWidth={props.style.borderWidth}
$borderRadius={props.style.borderRadius}
>
<NavInner $justify={justify}>
{props.logoUrl && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,17 @@ let MentionTmpComp = (function () {
label: value,
}))}
autoSize={props.autoHeight}
style={{ height: "100%", maxHeight: "100%", resize: "none", padding: props.style.padding, fontStyle: props.style.fontStyle, fontFamily: props.style.fontFamily, borderWidth: props.style.borderWidth, fontWeight: props.style.textWeight }}
style={{
height: "100%",
maxHeight: "100%",
resize: "none",
padding: props.style.padding,
fontStyle: props.style.fontStyle,
fontFamily: props.style.fontFamily,
borderWidth: props.style.borderWidth,
fontWeight: props.style.textWeight,
fontSize: props.style.textSize
}}
readOnly={props.readOnly}
/>
</ConfigProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ function replaceAndMergeMultipleStyles(originalArray: any[], styleToReplace: str
}

export const ButtonStyle = [
...getBgBorderRadiusByBg("primary"),
// ...getBgBorderRadiusByBg("primary"),
getBackground('primary'),
...STYLING_FIELDS_SEQUENCE
] as const;

Expand Down Expand Up @@ -1084,30 +1085,41 @@ export const ProgressStyle = [
depTheme: "canvas",
depType: DEP_TYPE.CONTRAST_TEXT,
transformer: contrastText,
}]).filter((style)=> ['border','borderWidth'].includes(style.name) === false),
}]).filter((style) => ['border', 'borderWidth'].includes(style.name) === false),
TRACK,
FILL,
SUCCESS,
] as const;

export const NavigationStyle = [
{
name: "text",
label: trans("text"),
depName: "background",
depType: DEP_TYPE.CONTRAST_TEXT,
transformer: contrastText,
},
ACCENT,
getStaticBackground("#FFFFFF00"),
getStaticBorder("#FFFFFF00"),
MARGIN,
PADDING,
FONT_FAMILY,
FONT_STYLE,
TEXT_WEIGHT,
TEXT_SIZE,
BORDER_WIDTH
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE, 'text', [
{
name: "text",
label: trans("text"),
depName: "background",
depType: DEP_TYPE.CONTRAST_TEXT,
transformer: contrastText,
},
ACCENT,
getStaticBackground("#FFFFFF00")
])
// {
// name: "text",
// label: trans("text"),
// depName: "background",
// depType: DEP_TYPE.CONTRAST_TEXT,
// transformer: contrastText,
// },
// ACCENT,
// getStaticBackground("#FFFFFF00"),
// getStaticBorder("#FFFFFF00"),
// MARGIN,
// PADDING,
// FONT_FAMILY,
// FONT_STYLE,
// TEXT_WEIGHT,
// TEXT_SIZE,
// BORDER_WIDTH
] as const;

export const ImageStyle = [getStaticBorder("#00000000"), RADIUS, BORDER_WIDTH, MARGIN, PADDING] as const;
Expand Down