fix: container gap with wrapper on border radius (#14530)
This commit is contained in:
parent
cf4eebde39
commit
932ff31a68
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user