From f9deaa58b689fcc310fb5fd46fe89eb253a12f42 Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Sun, 6 Sep 2020 14:40:01 +0300 Subject: [PATCH] Update Tabs --- snippets/Tabs.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/snippets/Tabs.md b/snippets/Tabs.md index 52d61e408..1ec81f40e 100644 --- a/snippets/Tabs.md +++ b/snippets/Tabs.md @@ -5,9 +5,9 @@ tags: components,state,children,intermediate Renders a tabbed menu and view component. -- Define a `TabItem` component, pass it to the `Tab` and remove unnecessary nodes expect for `TabItem` by identifying the function's name in `props.children`. -- Use the `React.useState()` hook to initialize the value of the `bindIndex` state variable to `props.defaultIndex`. -- Use `Array.prototype.map` on the collected nodes to render the `tab-menu` and `tab-view`. +- Define a `TabItem` component, pass it to the `Tab` and remove unnecessary nodes expect for `TabItem` by identifying the function's name in `children`. +- Use the `React.useState()` hook to initialize the value of the `bindIndex` state variable to `defaultIndex`. +- Use `Array.prototype.map()` on the collected nodes to render the `tab-menu` and `tab-view`. - Define `changeTab`, which will be executed when clicking a `