Trendyol / baklava-react-native

https://trendyol.github.io/baklava-react-native/
MIT License
102 stars 6 forks source link

Tabs Component #25

Open ergenekonyigit opened 1 year ago

ergenekonyigit commented 1 year ago

Design

Figma Design Document

Implementation

General usage example:

  const [value, setValue] = useState("tab1");
  //...
  <Tabs value={value} onValueChange={setValue}>
    <Tabs.List>
      <Tabs.Option value="tab1" title="tab 1" caption="" badge={<Badge variant="" />} icon="" disabled>
      <Tabs.Option value="tab2" title="tab 2"  caption="" badge={<Badge variant="" />} icon="">
    </Tabs.List>
    <Tabs.Content value="tab1"><ContentView /></Tabs.Content>
    <Tabs.Content value="tab2"><ContentView /></Tabs.Content>
  </Tabs>

Rules

API Reference:

Tabs component

Tabs are used to organize related content. They allow the user to navigate between groups of information that appear within the same context.

Tabs Properties

Property Description Default Value
value (string) The value of the Tab -
onValueChange (function) The onValueChange function of the Tab -
defaultValue (string) The defaultValue of the Tab -

Tabs.Option Properties

Property Description Default Value
value (string) The value of the Tab -
title (string) The title of the Tab -
caption (string) The caption of the Tab -
icon (string) The icon of the Tab -
badge (Badge) The badge of the Tab -
disabled (boolean) The disabled state of the Tab false
visible (boolean) The visible state of the Tab true
buseselvi commented 1 year ago

Here is the design documentation link. 🚀