fix: variable styles (#1167)
Co-authored-by: sealday <sealday@gmail.com> Reviewed-on: daoyoucloud/tachybase#1167
This commit is contained in:
parent
b213c7fc49
commit
c6a7cabfa8
@ -357,7 +357,7 @@ export function TextArea(props) {
|
||||
const disabled = props.disabled || form.disabled;
|
||||
|
||||
return (
|
||||
<Space.Compact className={cx(styles.outerContainer, styles.container)}>
|
||||
<Space.Compact className={cx(styles.fixInput, styles.outerContainer, styles.container)}>
|
||||
<div
|
||||
role="button"
|
||||
aria-label="textbox"
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { unit } from '@ant-design/cssinjs';
|
||||
import { createStyles } from 'antd-style';
|
||||
|
||||
export const useStyles = createStyles(({ token, css }, { multiline, disabled }) => {
|
||||
export const useStyles = createStyles(({ token, css, prefixCls }, { multiline, disabled }) => {
|
||||
const { lineWidth, colorFillQuaternary } = token;
|
||||
const inputPaddingHorizontalBase = token.paddingSM - 1;
|
||||
const tagPaddingHorizontal = 8; // Fixed padding.
|
||||
@ -11,22 +12,20 @@ export const useStyles = createStyles(({ token, css }, { multiline, disabled })
|
||||
|
||||
return {
|
||||
fixInput: css`
|
||||
.ant-input {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
.${prefixCls}-input {
|
||||
padding: 3px 7px;
|
||||
color: rgba(0, 0, 0, 0.88);
|
||||
font-size: 12px;
|
||||
line-height: 1.6666666666666667;
|
||||
list-style: none;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
|
||||
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
border-radius: 0;
|
||||
transition: all 0.1s;
|
||||
border-width: ${unit(token.lineWidth)};
|
||||
border-style: ${token.lineType};
|
||||
border-color: ${token.colorBorder};
|
||||
font-size: ${unit(token.fontSize)};
|
||||
line-height: ${token.lineHeight};
|
||||
&:hover {
|
||||
border-color: ${token.colorPrimaryBorderHover};
|
||||
}
|
||||
&:focus {
|
||||
border-color: ${token.colorPrimaryBorderHover};
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
`,
|
||||
outerContainer: {
|
||||
@ -115,7 +114,6 @@ export const useStyles = createStyles(({ token, css }, { multiline, disabled })
|
||||
},
|
||||
},
|
||||
container: css`
|
||||
&.ant-input-group.ant-input-group-compact {
|
||||
display: flex;
|
||||
.ant-input {
|
||||
flex-grow: 1;
|
||||
@ -127,7 +125,6 @@ export const useStyles = createStyles(({ token, css }, { multiline, disabled })
|
||||
border-color: #d9d9d9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .x-button {
|
||||
height: min-content;
|
||||
|
Loading…
Reference in New Issue
Block a user