UNPKG

@airplane/views

Version:

A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.

41 lines (40 loc) 873 B
import { createStyles, useMantineTheme } from "@mantine/core"; const textSizeToMarginBottom = { xs: "0.25rem", sm: "0.25rem", md: "0.5rem", lg: "0.5rem", xl: "0.5rem" }; const useParagraphStyles = createStyles((theme, { size }) => { return { paragraph: { marginBottom: textSizeToMarginBottom[size], "&:last-child": { marginBottom: 0 } } }; }); const useRawTextStyles = createStyles((theme, { size }) => { return { root: { fontSize: theme.other.typography.textPreset[size].fontSize, lineHeight: theme.other.typography.textPreset[size].lineHeight } }; }); const useTextWeight = (size) => { const theme = useMantineTheme(); return theme.other.typography.textPreset[size].fontWeight; }; export { useParagraphStyles, useRawTextStyles, useTextWeight }; //# sourceMappingURL=Text.styles.js.map