@material-ui/core#withTheme TypeScript Examples
The following examples show how to use
@material-ui/core#withTheme.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DaoSettings.tsx From homebase-app with MIT License | 6 votes |
CustomTextarea = styled(withTheme(TextareaAutosize))((props) => ({
minHeight: 152,
boxSizing: "border-box",
width: "100%",
border: `1px solid ${props.theme.palette.primary.light}`,
marginTop: 14,
fontWeight: 300,
padding: "21px 20px",
fontFamily: "system-ui",
fontSize: 16,
background: props.theme.palette.primary.main,
color: props.theme.palette.text.secondary,
paddingRight: 40,
wordBreak: "break-word",
"&:hover": {
background: "rgba(129, 254, 183, 0.03)",
borderLeft: `2px solid ${props.theme.palette.secondary.light}`,
},
}))
Example #2
Source File: Governance.tsx From homebase-app with MIT License | 6 votes |
CustomSliderValue = styled(withTheme(Paper))((props) => ({
boxShadow: "none",
height: 62,
border: `1px solid ${props.theme.palette.primary.light}`,
display: "flex",
alignItems: "center",
justifyContent: "center",
borderRadius: 0,
background: props.theme.palette.primary.main,
}))
Example #3
Source File: LoadingPage.tsx From clearflask with Apache License 2.0 | 6 votes |
class LoadingPage extends Component<WithTheme> {
render() {
return (
<Box
display='flex'
justifyContent='center'
alignItems='center'
width='100%'
height={this.props.theme.vh(100)}
>
<Loading />
</Box>
);
}
}
Example #4
Source File: EditTaskDialog.tsx From knboard with MIT License | 6 votes |
EditorWrapper = styled.div<WithTheme & { editing: boolean }>`
margin: 1rem 0;
margin-right: 2rem;
${(props) => createMdEditorStyles(props.editing)};
.rc-md-editor {
min-height: ${(props) => (props.editing ? 180 : 32)}px;
border: none;
.section-container {
${(props) =>
props.editing &&
`
outline: none;
box-shadow: inset 0 0 0 2px ${PRIMARY};
`};
padding: ${(props) => (props.editing ? "8px" : "0px")} !important;
&.input {
line-height: 20px;
}
}
}
`
Example #5
Source File: AuthenticatedApp.tsx From knboard with MIT License | 5 votes |
Main = styled.div<WithTheme>`
${(props) => props.theme.breakpoints.up("sm")} {
margin-left: ${sidebarWidth + 8}px;
}
`
Example #6
Source File: Profile.tsx From knboard with MIT License | 5 votes |
FormContainer = styled.div<WithTheme>`
margin-top: 2rem;
display: flex;
align-items: center;
${(props) => props.theme.breakpoints.down("xs")} {
flex-direction: column;
}
`
Example #7
Source File: EditTaskDialog.tsx From knboard with MIT License | 5 votes |
Content = styled.div<WithTheme>`
display: flex;
padding: 2rem;
height: ${taskDialogHeight}px;
${(props) => props.theme.breakpoints.down("xs")} {
flex-direction: column;
}
`
Example #8
Source File: EditTaskDialog.tsx From knboard with MIT License | 5 votes |
Side = styled.div<WithTheme>`
margin-top: 2rem;
${(props) => props.theme.breakpoints.up("sm")} {
max-width: ${taskSideWidth}px;
min-width: ${taskSideWidth}px;
}
`