Skip to content

Commit

Permalink
feat(ui): menu component
Browse files Browse the repository at this point in the history
  • Loading branch information
32penkin committed Aug 23, 2019
1 parent f488839 commit 73abe87
Show file tree
Hide file tree
Showing 20 changed files with 1,649 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/src/landing/js/webflow.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions docs/src/structure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,15 @@ export const structure = [
},
],
},
{
type: 'tabs',
name: 'Menu',
icon: 'menu.svg',
source: [
'Menu',
'MenuItem',
],
},
{
type: 'group',
name: 'Forms',
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/compile-ts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# because it should not contain module aliases

env=${1}
tscpaths -p ./tsconfig.${env}.json -s ./src/framework -o ./dist/tsc-out/framework
tsc -p ./tsconfig.${env}.json
36 changes: 36 additions & 0 deletions src/framework/ui/divider/divider.component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/

import React from 'react';
import {
View,
ViewProps,
} from 'react-native';
import {
styled,
StyledComponentProps,
} from '@kitten/theme';

export type DividerProps = StyledComponentProps & ViewProps;
export type DividerElement = React.ReactElement<DividerProps>;

class DividerComponent extends React.Component<DividerProps> {

static styledComponentName: string = 'Divider';

public render(): DividerElement {
const { style, themedStyle, ...restProps } = this.props;

return (
<View
{...restProps}
style={[themedStyle, style]}
/>
);
}
}

export const Divider = styled<DividerProps>(DividerComponent);
21 changes: 21 additions & 0 deletions src/framework/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@ export {
ListItemProps,
ListItemElement,
} from './list/listItem.component';
export {
Menu,
MenuProps,
MenuElement,
} from './menu/menu.component';
export {
MenuItem,
MenuItemProps,
MenuItemElement,
MenuItemType,
} from './menu/menuItem.component';
export {
SubMenu,
SubMenuElement,
SubMenuProps,
} from './menu/subMenu.component';
export {
Modal,
ModalProps,
Expand Down Expand Up @@ -103,6 +119,11 @@ export {
RadioGroupProps,
RadioGroupElement,
} from './radioGroup/radioGroup.component';
export {
Divider,
DividerElement,
DividerProps,
} from './divider/divider.component';
export {
Spinner,
SpinnerProps,
Expand Down
1 change: 0 additions & 1 deletion src/framework/ui/list/listItem.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ export class ListItemComponent extends React.Component<ListItemProps> {
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
},
contentContainer: {
Expand Down

0 comments on commit 73abe87

Please sign in to comment.