Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
WIP - Tab
Browse files Browse the repository at this point in the history
  • Loading branch information
fdaciuk committed May 22, 2021
1 parent 22b58ab commit 9893ccf
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/components/Tab/Tab.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions src/components/Tab/Tab.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
open Render

module Styles = Tab_Styles

@react.component
let make = (~children) =>
<div className=Styles.tab>
children
</div>

module Pane = {
@react.component
let make = (~children) =>
<div className=Styles.pane>
<Typography>{"Title"->s}</Typography>
children
</div>
}

module Content = {
@react.component
let make = (~children, ~pane) =>
<div>
children
</div>
}
22 changes: 22 additions & 0 deletions src/components/Tab/Tab_Stories.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions src/components/Tab/Tab_Stories.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
open Storybook
open Render

storiesOf("Tab", Helpers.storybookModule)
->add("Basic usage", () => {
<Tab>
<Tab.Pane>
{"Tab content for your feed"->s}
</Tab.Pane>

<Tab.Pane>
{"Tab content for global feed"->s}
</Tab.Pane>
</Tab>
})
->ignore
17 changes: 17 additions & 0 deletions src/components/Tab/Tab_Styles.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/components/Tab/Tab_Styles.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
open CssJs

let tab = style(.[
border(1->px, solid, red),
display(#flex),
])

let pane = style(.[
border(1->px, solid, green),
])

0 comments on commit 9893ccf

Please sign in to comment.