У меня есть управление формой, рендеринг antd form.item :
const FormEditData: React.FC = ({ label, name, field, rules, customProps, children }) => {
const namePath = [name].concat('value')
const isEditable = field?.fieldAccess > 0
if (isEditable) {
return (
{ children}
)
}
return null
}
export { FormEditData }
< /code>
Это рендеринг как: < /p>
Nachname
< /code>
с модулем CSS, определенным как: < /p>
.FormEditItem {
margin-bottom: 0.5em;
margin-top: 0.5em;
}
.FormEditItem div {padding: 0;}
The margin to the .FormEditItem is applied correctly, but I want the padding of the child div with the class annotation ant-col ant-form-item-label changed from 0 0 8px to 0
However I seem to be unable to find a suitable path to that element, so that it gets styled Правильно. < /p>
Протестированные пути: < /p>
.FormEditItem div {padding: 0;} //not specified enough
.FormEditItem div.ant-col {padding: 0;} // not applied
.FormEditItem div.ant-col.ant-form-item-label {padding: 0;} // not applied
.FormEditItem .ant-col {padding: 0;} // not applied
.FormEditItem .ant-col.ant-form-item-label {padding: 0;} // not applied
Подробнее здесь: https://stackoverflow.com/questions/678 ... form-label
Как удалить прокладку на этикетке Antd Form ⇐ CSS
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение