Skip to content

Commit

Permalink
refactor(ui): apply popover mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh authored Apr 8, 2019
1 parent 55fe0c9 commit 130aa7a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
22 changes: 20 additions & 2 deletions src/framework/ui/common/mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,20 @@
"Popover": {
"meta": {
"scope": "all",
"parameters": {},
"parameters": {
"minWidth": {
"type": "number"
},
"minHeight": {
"type": "number"
},
"borderRadius": {
"type": "number"
},
"backgroundColor": {
"type": "string"
}
},
"appearances": {
"default": {
"default": true
Expand All @@ -1455,7 +1468,12 @@
},
"appearances": {
"default": {
"mapping": {}
"mapping": {
"minWidth": 56,
"minHeight": 32,
"borderRadius": 8,
"backgroundColor": "color-white"
}
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/framework/ui/popover/popover.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class Popover extends React.Component<Props, State> {
private getComponentStyle = (source: StyleType): StyleType => {
return {
child: {},
popover: {},
popover: source,
};
};

Expand Down
2 changes: 1 addition & 1 deletion src/framework/ui/popover/popoverView.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class PopoverView extends React.Component<Props> {

static defaultProps: Partial<Props> = {
placement: PLACEMENT_DEFAULT.rawValue,
indicatorOffset: 0,
indicatorOffset: 8,
};

private getComponentStyle = (source: StyleType, placement: Placement): StyleType => {
Expand Down
1 change: 1 addition & 0 deletions src/playground/src/ui/screen/popover.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default withStyles(PopoverScreen, (theme: ThemeType) => ({
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'lightgray',
},
componentContainer: {
margin: 32,
Expand Down

0 comments on commit 130aa7a

Please sign in to comment.