add styles

parent 54fba12c
...@@ -4,7 +4,7 @@ import './App.css' ...@@ -4,7 +4,7 @@ import './App.css'
function App() { function App() {
return ( return (
<> <>
<Card/> <Card title='Hello react'/>
</> </>
) )
} }
......
...@@ -4,4 +4,7 @@ ...@@ -4,4 +4,7 @@
border-radius: 15px; border-radius: 15px;
border: 1px solid gray; border: 1px solid gray;
background-color: gray; background-color: gray;
display: flex;
justify-content: center;
align-items: center;
} }
\ No newline at end of file
import Text from '../Text/Text'
import './Card.css' import './Card.css'
const Card = () => { type TProps = {
title: string
}
const Card = ({title}: TProps) => {
return ( return (
<div className='Card'> <div className='Card'>
<Text title={title}/>
</div> </div>
) )
} }
......
.text {
color: white;
font-size: 18px;
}
\ No newline at end of file
import './Text.css'
type TProps = {
title: string
}
const Text = ({title}: TProps) => {
return (
<p className='text'>
{title}
</p>
)
}
export default Text
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment