✨(react) add generic Field component
This component will wrap most of form components in order to provide them a generic state attribute along with texts below them.
This commit is contained in:
30
packages/react/src/components/Forms/Field/index.scss
Normal file
30
packages/react/src/components/Forms/Field/index.scss
Normal file
@@ -0,0 +1,30 @@
|
||||
.c__field {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
width: var(--c--components--forms-field--width);
|
||||
color: var(--c--components--forms-field--color);
|
||||
box-sizing: border-box;
|
||||
|
||||
&__footer {
|
||||
font-size: var(--c--components--forms-field--font-size);
|
||||
padding: 0.25rem calc(1rem + 2px) 0 calc(1rem + 2px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&__text, &__text-right {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
&--error {
|
||||
color: var(--c--theme--colors--danger-500);
|
||||
}
|
||||
|
||||
&--success {
|
||||
color: var(--c--theme--colors--success-600)
|
||||
}
|
||||
|
||||
&--full-width {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user