Skip to content

Commit 3ec23f7

Browse files
committed
add component example
1 parent 120cec4 commit 3ec23f7

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,22 @@ yarn add react-simple-tabs-component
2323
## Usage
2424

2525
```jsx
26-
import React, { useState } from 'react'
26+
import React, { useState,Fragment } from 'react'
2727
import { Tabs } from 'react-simple-tabs-component'
28-
// (Optional) Provide some basic style
29-
import 'react-simple-tabs-component/dist/index.css'
28+
import 'react-simple-tabs-component/dist/index.css' // (Optional) Provide some basic style
29+
30+
// Component Example
31+
const TabOne = () => {
32+
return (
33+
<Fragment>
34+
<h3>Tab One</h3>
35+
<p>
36+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis sint illum iusto nostrum cumque qui
37+
voluptas tenetur inventore ut quis?
38+
</p>
39+
</Fragment>
40+
)
41+
}
3042

3143
// Tabs structure Array
3244
const tabs = [

0 commit comments

Comments
 (0)