diff options
Diffstat (limited to 'react/04-components/src/components/MyOtherComponent.jsx')
| -rw-r--r-- | react/04-components/src/components/MyOtherComponent.jsx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/react/04-components/src/components/MyOtherComponent.jsx b/react/04-components/src/components/MyOtherComponent.jsx new file mode 100644 index 0000000..1dc5c68 --- /dev/null +++ b/react/04-components/src/components/MyOtherComponent.jsx @@ -0,0 +1,14 @@ +import React from 'react' + +const MyOtherComponent = ({title, children}) => { + return ( + <> + <div style={{marginTop: '10px'}}> + <div style={{fontWeight: 'bold', backgroundColor: '#f0f0f0', border: '1px solid #ccc'}}>{title}</div> + <div>{children}</div> + </div> + </> + ) +} + +export default MyOtherComponent
\ No newline at end of file |
