teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

文法の修正

2019/01/01 02:44

投稿

ktus
ktus

スコア12

title CHANGED
File without changes
body CHANGED
@@ -19,9 +19,11 @@
19
19
 
20
20
  ### 解決策(Meganezaru様ありがとうございます)
21
21
  ```
22
+ export const Button = styled.div`
22
23
  ${ItemContainer}:only-child & {
23
24
  ${props => props.remove && `
24
25
  display: none;
25
26
  `}
26
27
  }
28
+ `;
27
29
  ```

2

誤記修正

2019/01/01 02:44

投稿

ktus
ktus

スコア12

title CHANGED
File without changes
body CHANGED
@@ -8,8 +8,8 @@
8
8
  <ItemContainer>
9
9
  <Text>{item.text}</Text>
10
10
  <ButtonsGroupe>
11
- <Button remove onClick={Remove}>Remove<Button> // :only-child: {display: none;}
11
+ <Button remove onClick={Remove}>Remove</Button> // :only-child: {display: none;}
12
- <Button add onClick={Add}>Add<Button>
12
+ <Button add onClick={Add}>Add</Button>
13
13
  </ButtonsGroupe>
14
14
    </ItemContainer>
15
15
  </Item>
@@ -17,7 +17,7 @@
17
17
  </Container>
18
18
  ```
19
19
 
20
- ### 解決策(meganezaru様ありがとうございます)
20
+ ### 解決策(Meganezaru様ありがとうございます)
21
21
  ```
22
22
  ${ItemContainer}:only-child & {
23
23
  ${props => props.remove && `

1

解決策の追加

2019/01/01 02:41

投稿

ktus
ktus

スコア12

title CHANGED
File without changes
body CHANGED
@@ -15,4 +15,13 @@
15
15
  </Item>
16
16
  )}
17
17
  </Container>
18
+ ```
19
+
20
+ ### 解決策(meganezaru様ありがとうございます)
21
+ ```
22
+ ${ItemContainer}:only-child & {
23
+ ${props => props.remove && `
24
+ display: none;
25
+ `}
26
+ }
18
27
  ```