Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit b1f33e2

Browse files
committed
docs: update cra example
1 parent b49316b commit b1f33e2

File tree

3 files changed

+1554
-1480
lines changed

3 files changed

+1554
-1480
lines changed

examples/create-react-app/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"version": "2.0.0-rc.43",
44
"private": true,
55
"dependencies": {
6-
"docz": "2.0.0-rc.43",
7-
"react": "^16.9.0",
8-
"react-dom": "^16.9.0",
9-
"react-scripts": "3.1.1"
6+
"docz": "next",
7+
"react": "^16.11.0",
8+
"react-dom": "^16.11.0",
9+
"react-scripts": "^3.2.0"
1010
},
1111
"scripts": {
12-
"docz": "docz dev",
12+
"dev": "docz dev",
1313
"docz:build": "docz build",
1414
"docz:serve": "docz serve",
1515
"start": "react-scripts start",

examples/create-react-app/src/components/Alert.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const kinds = {
88
warning: '#FFA502',
99
}
1010

11-
const AlertStyled = ({ children, kind, ...rest }) => (
11+
export const Alert = ({ children, kind, ...rest }) => (
1212
<div
1313
style={{
1414
padding: 20,
@@ -23,9 +23,10 @@ const AlertStyled = ({ children, kind, ...rest }) => (
2323
</div>
2424
)
2525

26-
export const Alert = props => <AlertStyled {...props} />
27-
2826
Alert.propTypes = {
27+
/**
28+
* The kind prop is used to set the alert's background color
29+
*/
2930
kind: t.oneOf(['info', 'positive', 'negative', 'warning']),
3031
}
3132

0 commit comments

Comments
 (0)