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

Commit b49316b

Browse files
committed
docs: update basic example
1 parent 9606a59 commit b49316b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/basic/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"dependencies": {
1717
"docz": "next",
1818
"prop-types": "^15.7.2",
19-
"react": "^16.8.6",
20-
"react-dom": "^16.8.6",
21-
"scheduler": "^0.15.0"
19+
"react": "^16.11.0",
20+
"react-dom": "^16.11.0"
2221
}
2322
}

examples/basic/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)