Skip to content

Commit a8531d2

Browse files
Document new component, label.
1 parent 6cdb7af commit a8531d2

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,52 @@ export default Example
125125
| ssr | Set if the component should rendered on server | _Boolean_ | false|
126126

127127

128+
### Label
129+
130+
- <h4>Describe</h4>
131+
Wrapper component that add label on other components
132+
133+
- <h4>Screenshot</h4>
134+
<img height="170" src="https://i.imgur.com/rBX3ttU.png" alt="Medium Posts Card Carousel with label"></a>
135+
136+
- <h4>Example with carousel</h4>
137+
138+
```javascript
139+
import { Carousel, Label } from 'mediumpostscard'
140+
141+
function Example(){
142+
return (
143+
<Label>
144+
<Carousel username="alex.streza" />
145+
</Label>
146+
)
147+
}
148+
149+
export default Example
150+
```
151+
152+
- <h4>Example with List</h4>
153+
154+
```javascript
155+
import { List, Label } from 'mediumpostscard'
156+
157+
function Example(){
158+
return (
159+
<Label>
160+
<List username="alex.streza" />
161+
</Label>
162+
)
163+
}
164+
165+
export default Example
166+
```
167+
- <h4>Valid Props</h4>
168+
169+
| Prop name | Description | Type | Default |
170+
| ---------- |:----------------------------------:| ----------: | ----------------:|
171+
| text | Set text on label | _String_ | 'Medium Articles'
172+
| children | Set component to be labeled | JSX.Element | No default
173+
128174
## <span id="server_side_rendering">Server Side Rendering</span>
129175

130176
- <h4>Usage</h4>

0 commit comments

Comments
 (0)