一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
38 行
941 B
TypeScript
38 行
941 B
TypeScript
const styled = require('styled-components').default;
|
|
const Color = require('color');
|
|
|
|
interface StyleProps {
|
|
theme: {
|
|
color: string;
|
|
color4: string;
|
|
colorFaded: string;
|
|
fontSize: number;
|
|
backgroundColor: string;
|
|
dividerColor: string;
|
|
};
|
|
}
|
|
|
|
const StyledInput = styled.input`
|
|
border: 1px solid ${(props: StyleProps) => props.theme.dividerColor};
|
|
border-radius: 6px;
|
|
font-size: ${(props: StyleProps) => props.theme.fontSize}px;
|
|
color: ${(props: StyleProps) => props.theme.color};
|
|
padding: 0 10px;
|
|
height: 30px;
|
|
max-height: 30px;
|
|
box-sizing: border-box;
|
|
background-color: ${(props: StyleProps) => props.theme.backgroundColor};
|
|
outline: none;
|
|
|
|
&::placeholder {
|
|
color: ${(props: StyleProps) => props.theme.colorFaded};
|
|
}
|
|
|
|
&:focus {
|
|
border-color: ${(props: StyleProps) => props.theme.color4};
|
|
box-shadow: 0 0 0 3px ${(props: StyleProps) => Color(props.theme.color4).alpha(0.15)};
|
|
}
|
|
`;
|
|
|
|
export default StyledInput;
|