forked from Technigo/js-project-portfolio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.jsx
53 lines (46 loc) · 1.08 KB
/
App.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<GlobalStyle />
import React from "react"
import Card from "./components/card"
import { createGlobalStyle } from "styled-components";
import "./App.css"
import card from " ./data/card/json";
import styled from 'styled-components';
import styled, { css } from 'styled-components'
const CardWrapper = styled.article``;
const Button = styled.button`
background: transparent;
border-radius: 3px;
border: 2px solid #BF4F74;
color: '#BF4F74';
margin: 0 1em;
padding: 0.25em 1em;
${props =>
props.$primary &&
css`
background: '#BF4F74';
color: white;
`};
`
// Here we're saying that when the $primary property is set we want to add some more css to our component, in this case change the background and
console.log(card)
// Removed duplicate Button declaration
const App = () => {
return (
<>
<h1>Vite project</h1>
<Card
title="My profile card"
text="My first text"
/>
<Card
title="My second card"
text="My second text"
/>
<Card
key={card.name}
title={card.name}
/>
</>
)
}
export default App