3ebe9e36ebd518986abce895478375640d

이건 공식문서임


위에처럼 부모안에 자식컴포넌트 추가해서 className 달아서 부모랑 자식 연결해서

.className 선택자로 스타일링 하려고 함


import React from 'react';
import styled from 'styled-components';
import ButtonComponent from './button';

const Container = styled.ul`
    display: flex;
    align-items: center;
    justify-content: space-between;

    .land {
        opacity: 0.1;
    }
`;

type ConstructionProps = {};

function Construction({}: ConstructionProps) {
    return (
        <Container>
            <ButtonComponent
                className={'land'}
                icon={<i className='fas fa-flag'></i>}
                name='땅'
                callback={() => {
                    console.log('buttonClick');
                }}
            ></ButtonComponent>


간단하게 자식요소 opacity: 0.1이 작동하는지 확인하려 했는데 잘 안됨 ㅠㅠ

원래 외부에서 import한 컴포넌트는 안됨???????