Skip to content

Commit

Permalink
[Lab] Add Breadcrumbs component
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Feb 4, 2019
1 parent 0f0afbc commit e9e1e04
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@

-cp src
--macro include('mui.core', true)
--macro include('mui.lab', true)
-js .build/test.js

2 changes: 1 addition & 1 deletion src/mui/core/Link.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import mui.core.typography.TypographyClassKey;

typedef LinkProps = ForcedOverride<TypographyProps, {
var children:ReactFragment;
@:optional var classes:Record<LinkClassKey>;
@:optional var block:Bool;
@:optional var classes:Record<LinkClassKey>;
@:optional var target:LinkTarget;
@:optional var TypographyClasses:Record<TypographyClassKey>;
@:optional var underline:LinkUnderline;
Expand Down
18 changes: 18 additions & 0 deletions src/mui/lab/Breadcrumbs.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package mui.lab;

import mui.lab.breadcrumbs.BreadcrumbsClassKey;

typedef BreadcrumbsProps = {
> StandardDOMAttributes,

var children:ReactFragment;
@:optional var classes:Record<BreadcrumbsClassKey>;
@:optional var component:ReactType;
@:optional var itemsAfterCollapse:Int;
@:optional var itemsBeforeCollapse:Int;
@:optional var maxItems:Int;
@:optional var separator:ReactSingleFragment;
}

@:jsRequire('@material-ui/lab', 'Breadcrumbs')
extern class Breadcrumbs extends ReactComponentOfProps<BreadcrumbsProps> {}
7 changes: 7 additions & 0 deletions src/mui/lab/breadcrumbs/BreadcrumbsClassKey.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package mui.lab.breadcrumbs;

@:enum abstract BreadcrumbsClassKey(String) to String {
var Root = "root";
var Ol = "ol";
var Separator = "separator";
}
19 changes: 19 additions & 0 deletions src/mui/lab/import.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package mui.lab;

#if !macro
import js.html.Event;
import js.html.HtmlElement;

import react.Partial;
import react.ReactComponent;
import react.ReactRef;
import react.ReactType;

import react.types.CallbackOrVoid;
import react.types.DOMAttributes;
import react.types.DOMOrCallback;
import react.types.ForcedOverride;
import react.types.HandlerOrVoid;
import react.types.Noise;
import react.types.Record;
#end

0 comments on commit e9e1e04

Please sign in to comment.