fix: container gap with wrapper on border radius (#14530)

This commit is contained in:
Arsalan Yaldram 2022-06-23 23:25:03 +05:30 committed by GitHub
parent cf4eebde39
commit 932ff31a68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -19,6 +19,7 @@ export interface WidgetStyleContainerProps {
containerStyle?: ContainerStyle;
children?: ReactNode;
borderColor?: Color;
backgroundColor?: Color;
borderWidth?: number;
borderRadius?: number;
boxShadow?: BoxShadow;
@ -29,17 +30,18 @@ const WidgetStyle = styled.div<WidgetStyleContainerProps>`
height: 100%;
width: 100%;
border-radius: ${({ borderRadius }) => borderRadius};
box-shadow: ${(props) => props.boxShadow} !important;
box-shadow: ${(props) => props.boxShadow} !important;
border-width: ${(props) => props.borderWidth}px;
border-color: ${(props) => props.borderColor || "transparent"};
border-style: solid;
background-color: ${(props) => props.backgroundColor || "transparent"};
& > div {
height: 100%;
width: 100%;
overflow: hidden;
}
}`;
`;
// wrapper component for apply styles on any widget boundary
function WidgetStyleContainer(props: WidgetStyleContainerProps) {

View File

@ -51,7 +51,7 @@ const StyledContainerComponent = styled.div<
: props.backgroundColor;
}};
}
}`;
`;
function ContainerComponentWrapper(props: ContainerComponentProps) {
const containerStyle = props.containerStyle || "card";
@ -94,6 +94,7 @@ function ContainerComponent(props: ContainerComponentProps) {
{...pick(props, [
"widgetId",
"containerStyle",
"backgroundColor",
"borderColor",
"borderWidth",
"borderRadius",