์ด๊ฒ์ prefixCls
๋ฌธ์ ๋ฅผ ์ถ์ ํ๊ธฐ์ํ ํฌ๊ด์ ์ธ ๋ฌธ์ ์
๋๋ค.
Input
๋ชฉ๋ก์ ํฌํจ๋์ด์ผํ๋ค๊ณ ์๊ฐํฉ๋๋ค.
import 'antd/dist/antd.less'
๋๋ import 'antd/lib/input/style'
์ฌ์ฉ์;
.ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix {
position: absolute;
top: 50%;
transform: translateY(-50%);
line-height: 0;
color: rgba(0, 0, 0, 0.65);
}
import 'antd/dist/antd.css'
์ฌ์ฉํ๋ ๋์ ๋ธ๋ผ์ฐ์ ๋ณ ์ ๋์ฌ๊ฐ ์์ต๋๋ค.
.ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
line-height: 0;
color: rgba(0, 0, 0, 0.65);
}
@chungwong ๊ฐ์ ๋ฌธ์ ๊ฐ ์๋๋๋ค.
๋ด๋ถ ํ ๋ก ์์ :
prefixCls
๊ตฌ์ฑ์ ์ํด ConfigProvider
๋ผ๋ ์ ๊ณต๊ธ์๋ฅผ ์๊ฐํฉ๋๋ค.
import { ConfigProvider, Button } from 'antd';
<ConfigProvider prefixCls="awesome-">
<Button>A Button</Button>
</ConfigProvider
์์ฑ :
<button type="button" class="awesome-btn"><span>A Button</span></button>
# 12991์ ํตํด ํด๊ฒฐ๋ฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋ด๋ถ ํ ๋ก ์์ :
prefixCls
๊ตฌ์ฑ์ ์ํดConfigProvider
๋ผ๋ ์ ๊ณต๊ธ์๋ฅผ ์๊ฐํฉ๋๋ค.์์ฑ :