admin(ui): show eggs in NestEditContainer
This commit is contained in:
parent
cf006c9d36
commit
a43ef62435
3 changed files with 132 additions and 24 deletions
|
@ -7,9 +7,9 @@ export interface Props {
|
|||
}
|
||||
|
||||
const light = css<Props>`
|
||||
${tw`bg-white border-neutral-200 text-neutral-800`};
|
||||
${tw`bg-white border-neutral-200 text-neutral-800`};
|
||||
&:focus { ${tw`border-primary-400`} }
|
||||
|
||||
|
||||
&:disabled {
|
||||
${tw`bg-neutral-100 border-neutral-200`};
|
||||
}
|
||||
|
@ -40,16 +40,16 @@ const inputStyle = css<Props>`
|
|||
${tw`appearance-none outline-none w-full min-w-0`};
|
||||
${tw`p-3 border-2 rounded text-sm transition-all duration-150`};
|
||||
${tw`bg-neutral-600 border-neutral-500 hover:border-neutral-400 text-neutral-200 shadow-none focus:ring-0`};
|
||||
|
||||
|
||||
& + .input-help {
|
||||
${tw`mt-1 text-xs`};
|
||||
${props => props.hasError ? tw`text-red-200` : tw`text-neutral-200`};
|
||||
}
|
||||
|
||||
|
||||
&:required, &:invalid {
|
||||
${tw`shadow-none`};
|
||||
}
|
||||
|
||||
|
||||
&:not(:disabled):not(:read-only):focus {
|
||||
${tw`shadow-md border-primary-300 ring-2 ring-primary-400 ring-opacity-50`};
|
||||
${props => props.hasError && tw`border-red-300 ring-red-200`};
|
||||
|
@ -58,7 +58,11 @@ const inputStyle = css<Props>`
|
|||
&:disabled {
|
||||
${tw`opacity-75`};
|
||||
}
|
||||
|
||||
|
||||
&:read-only {
|
||||
${tw`border-neutral-800 bg-neutral-900`};
|
||||
}
|
||||
|
||||
${props => props.isLight && light};
|
||||
${props => props.hasError && tw`text-red-100 border-red-400 hover:border-red-300`};
|
||||
`;
|
||||
|
@ -67,10 +71,10 @@ const Input = styled.input<Props>`
|
|||
&:not([type="checkbox"]):not([type="radio"]) {
|
||||
${inputStyle};
|
||||
}
|
||||
|
||||
|
||||
&[type="checkbox"], &[type="radio"] {
|
||||
${checkboxStyle};
|
||||
|
||||
|
||||
&[type="radio"] {
|
||||
${tw`rounded-full`};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue